3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyStuff extends ArrayObject { function offsetGet($offset) { echo "Called", PHP_EOL; return parent::offsetGet($offset); } } $array = array( 'foo' => 42, 'baz' => null, ); $array_object = new MyStuff($array); // existing key, non-null value: assert(isset($array['foo']) === true) ?: echo "isset(existing key, non-null value) failed"; assert(empty($array['foo']) === false); assert(isset($array_object['foo']) === true); assert(empty($array_object['foo']) === false); // non-existing key: assert(isset($array['bar']) === false); assert(empty($array['bar']) === true); assert(isset($array_object['bar']) === false); assert(empty($array_object['bar']) === true); // key where value is null: assert(isset($array['baz']) === false); assert(empty($array['baz']) === true); assert(isset($array_object['baz']) === false); assert(empty($array_object['baz']) === true);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.280.0100.03912.39
5.4.270.0070.04012.39
5.4.260.0110.04112.39
5.4.250.0120.05412.39
5.4.240.0100.04212.39
5.4.230.0120.04012.39
5.4.220.0080.04412.38
5.4.210.0130.04512.39
5.4.200.0140.04712.39
5.4.190.0080.04812.38
5.4.180.0060.04812.38
5.4.170.0100.04912.39
5.4.160.0080.05112.39
5.4.150.0090.06212.38
5.4.140.0080.05312.07
5.4.130.0100.04712.06
5.4.120.0090.04912.02
5.4.110.0080.04712.02
5.4.100.0100.04912.02
5.4.90.0090.04912.02
5.4.80.0110.05312.01
5.4.70.0080.04712.01
5.4.60.0080.05212.01
5.4.50.0090.05112.01
5.4.40.0070.04212.00
5.4.30.0090.04212.00
5.4.20.0080.05211.99
5.4.10.0090.04212.00
5.4.00.0080.04411.49
5.3.280.0110.04312.71
5.3.270.0070.04812.72
5.3.260.0080.04512.72
5.3.250.0080.04712.72
5.3.240.0100.04612.72
5.3.230.0120.04512.71
5.3.220.0110.04512.68
5.3.210.0100.04212.68
5.3.200.0080.05012.68
5.3.190.0120.05512.68
5.3.180.0100.05612.68
5.3.170.0100.04812.67
5.3.160.0070.04712.67
5.3.150.0080.04212.67
5.3.140.0080.04412.66
5.3.130.0100.04312.66
5.3.120.0100.04612.66
5.3.110.0130.04712.66
5.3.100.0100.04612.12
5.3.90.0100.04512.09
5.3.80.0080.04012.09
5.3.70.0070.04112.08
5.3.60.0080.04112.07
5.3.50.0110.04412.01
5.3.40.0090.04512.01
5.3.30.0090.04711.97
5.3.20.0080.04111.75
5.3.10.0070.03911.72
5.3.00.0070.03811.71

preferences:
138.28 ms | 1394 KiB | 7 Q