3v4l.org

run code in 300+ 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);

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)
8.3.60.0060.01218.80
8.3.50.0070.01419.88
8.3.40.0120.00318.80
8.3.30.0000.01418.79
8.3.20.0040.00420.86
8.3.10.0040.00421.96
8.3.00.0050.00320.76
8.2.180.0090.00917.13
8.2.170.0120.00322.96
8.2.160.0100.00720.47
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00526.16
8.2.110.0030.00620.47
8.2.100.0090.00318.03
8.2.90.0080.00019.29
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0000.00917.75
8.2.50.0080.00018.05
8.2.40.0040.00419.48
8.2.30.0040.00419.21
8.2.20.0000.00718.14
8.2.10.0000.01019.25
8.2.00.0060.00319.30
8.1.280.0160.00025.92
8.1.270.0050.00324.01
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00423.55
8.1.230.0040.00721.04
8.1.220.0040.00417.76
8.1.210.0060.00318.77
8.1.200.0030.00617.25
8.1.190.0090.00017.23
8.1.180.0050.00518.10
8.1.170.0040.00417.62
8.1.160.0040.00419.02
8.1.150.0000.00718.78
8.1.140.0070.00020.39
8.1.130.0030.00320.16
8.1.120.0040.00417.46
8.1.110.0070.00017.46
8.1.100.0050.00517.38
8.1.90.0040.00417.48
8.1.80.0040.00417.48
8.1.70.0000.00717.47
8.1.60.0040.00417.49
8.1.50.0040.00417.54
8.1.40.0130.00017.59
8.1.30.0080.00017.65
8.1.20.0030.00617.70
8.1.10.0040.00417.50
8.1.00.0000.00717.55
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0000.00718.51
8.0.270.0070.00016.84
8.0.260.0000.00620.15
8.0.250.0000.00717.07
8.0.240.0000.00716.95
8.0.230.0000.00717.07
8.0.220.0070.00017.03
8.0.210.0030.00317.00
8.0.200.0070.00017.04
8.0.190.0030.00317.06
8.0.180.0040.00416.98
8.0.170.0040.00417.06
8.0.160.0030.00317.03
8.0.150.0030.00516.91
8.0.140.0000.00717.00
8.0.130.0060.00013.44
8.0.120.0040.00416.89
8.0.110.0040.00417.02
8.0.100.0000.00816.97
8.0.90.0060.00317.01
8.0.80.0030.01317.08
8.0.70.0020.00517.09
8.0.60.0000.00816.86
8.0.50.0030.00517.02
8.0.30.0000.01917.21
8.0.20.0110.01017.19
8.0.10.0040.00417.09
8.0.00.0130.00616.83
7.4.330.0060.00016.66
7.4.320.0000.00616.42
7.4.300.0060.00016.56
7.4.290.0040.00416.52
7.4.280.0000.00816.63
7.4.270.0000.00816.57
7.4.260.0030.00313.23
7.4.250.0040.00416.49
7.4.240.0000.00816.58
7.4.230.0030.00316.49
7.4.220.0020.00716.54
7.4.210.0070.01116.59
7.4.200.0000.00716.51
7.4.130.0100.01016.53
7.4.120.0190.00016.65
7.4.110.0100.00716.65
7.4.100.0110.00716.56
7.4.90.0070.01116.56
7.4.80.0140.00419.39
7.4.70.0070.01016.42
7.4.60.0030.01716.50
7.4.50.0000.01516.51
7.4.40.0040.01216.52
7.4.10.0080.00715.05
7.4.00.0080.00914.97
7.3.330.0030.00316.51
7.3.320.0050.00013.30
7.3.310.0000.00716.53
7.3.300.0040.00416.41
7.3.290.0070.00016.36
7.3.280.0070.00716.49
7.3.260.0120.00816.52
7.3.240.0090.00916.50
7.3.230.0160.00016.64
7.3.210.0130.01016.60
7.3.200.0090.00916.47
7.3.190.0120.01216.45
7.3.180.0090.01216.65
7.3.170.0160.00616.55
7.3.160.0030.01316.41
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.330.0080.01516.91
7.2.320.0150.00916.81
7.2.310.0020.01516.82
7.2.300.0090.01216.54
7.2.290.0100.00716.82
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

preferences:
58.67 ms | 401 KiB | 5 Q