![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /usr/local/src/apcu-5.1.19/tests/ |
--TEST-- APC: apcu_cas test --SKIPIF-- <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> --INI-- apc.enabled=1 apc.enable_cli=1 --FILE-- <?php apcu_store('foobar',2); echo "\$foobar = 2\n"; echo "\$foobar == 1 ? 2 : 1 = ".(apcu_cas('foobar', 1, 2)?"ok":"fail")."\n"; echo "\$foobar == 2 ? 1 : 2 = ".(apcu_cas('foobar', 2, 1)?"ok":"fail")."\n"; echo "\$foobar = ".apcu_fetch("foobar")."\n"; echo "\$f__bar == 1 ? 2 : 1 = ".(apcu_cas('f__bar', 1, 2)?"ok":"fail")."\n"; apcu_store('perfection', "xyz"); echo "\$perfection == 2 ? 1 : 2 = ".(apcu_cas('perfection', 2, 1)?"ok":"epic fail")."\n"; echo "\$foobar = ".apcu_fetch("foobar")."\n"; ?> ===DONE=== --EXPECT-- $foobar = 2 $foobar == 1 ? 2 : 1 = fail $foobar == 2 ? 1 : 2 = ok $foobar = 1 $f__bar == 1 ? 2 : 1 = fail $perfection == 2 ? 1 : 2 = epic fail $foobar = 1 ===DONE===