3v4l.org

run code in 200+ PHP versions simultaneously
<?php $a = []; $keys = [ 'array' => [], 'object' => new stdClass, 'closure' => function () {}, 'class' => new class {}, 'class with tostring' => new class {function __toString(){return 'to string class';}}, 'resource' => fopen(__FILE__, 'r'), ]; foreach ($keys as $desc =>$key) { echo "===" . $desc . "===\n"; $a[$key] = true; echo "state of array: \n"; var_dump($a); echo "state of key: \n"; var_dump($key); echo "is the key set in the array: \n"; var_dump(isset($a[$key])); } echo "===============\n"; var_dump($a);
based on 3lpob

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)
7.4.10.0080.00715.05
7.4.00.0080.00914.97
7.3.130.0080.01114.73
7.3.120.0120.00714.81
7.3.110.0110.00815.01
7.3.100.0060.00914.70
7.3.90.0110.00514.78
7.3.80.0090.00614.87
7.3.70.0080.00714.82
7.3.60.0090.00614.81
7.3.50.0080.00614.73
7.3.40.0090.00614.84
7.3.30.0080.00514.77
7.3.20.0050.00816.34
7.3.10.0030.01216.33
7.3.00.0080.00516.29
7.2.260.0100.00915.11
7.2.250.0080.01015.04
7.2.240.0040.01215.05
7.2.230.0060.01015.02
7.2.220.0090.00715.23
7.2.210.0080.00714.88
7.2.200.0060.00914.95
7.2.190.0070.00815.07
7.2.180.0050.00815.06
7.2.170.0070.01015.07
7.2.160.0090.00615.02
7.2.150.0080.00716.49
7.2.140.0060.01016.54
7.2.130.0060.00916.58
7.2.120.0070.00816.66
7.2.110.0070.00916.52
7.2.100.0100.00616.55
7.2.90.0070.00916.60
7.2.80.0100.00616.72
7.2.70.0100.00716.52
7.2.60.0100.00916.58
7.2.50.0080.00816.56
7.2.40.0050.01016.59
7.2.30.0060.01016.50
7.2.20.0080.00616.55
7.2.10.0070.00916.56
7.2.00.0060.01116.56
7.1.330.0080.00515.95
7.1.320.0080.00615.42
7.1.310.0070.00715.55
7.1.300.0090.00515.33
7.1.290.0060.00715.43
7.1.280.0080.00515.40
7.1.270.0080.00615.33
7.1.260.0070.00715.29
7.1.250.0080.00715.41
7.1.240.0030.01115.76
7.1.230.0130.00315.79
7.1.220.0030.00715.65
7.1.210.0080.00515.74
7.1.200.0060.00415.79
7.1.190.0090.00415.85
7.1.180.0050.00915.97
7.1.170.0100.00515.72
7.1.160.0030.00815.97
7.1.150.0060.00915.78
7.1.140.0060.00515.55
7.1.130.0070.00615.74
7.1.120.0050.00915.95
7.1.110.0050.00815.63
7.1.100.0020.01215.91
7.1.90.0030.01015.98
7.1.80.0080.00615.91
7.1.70.0070.00915.93
7.1.60.0080.00815.74
7.1.50.0140.00315.74
7.1.40.0020.01015.82
7.1.30.0010.01015.86
7.1.20.0090.00415.68
7.1.10.0090.00615.96
7.1.00.0070.00815.78