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.0120.00618.58
8.3.50.0120.00919.96
8.3.40.0070.01118.79
8.3.30.0110.00418.79
8.3.20.0040.00420.91
8.3.10.0070.00022.16
8.3.00.0040.00420.58
8.2.180.0200.00316.88
8.2.170.0120.00322.96
8.2.160.0140.00320.52
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.01126.16
8.2.110.0040.00422.25
8.2.100.0120.00017.84
8.2.90.0050.00317.97
8.2.80.0040.00418.16
8.2.70.0030.00618.04
8.2.60.0000.00818.22
8.2.50.0000.00818.10
8.2.40.0040.00419.46
8.2.30.0000.00719.21
8.2.20.0050.00318.02
8.2.10.0030.00619.25
8.2.00.0040.00419.27
8.1.280.0100.00625.92
8.1.270.0040.00423.99
8.1.260.0020.00526.35
8.1.250.0070.00028.09
8.1.240.0090.00317.48
8.1.230.0060.00621.00
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0030.00517.35
8.1.180.0060.00318.10
8.1.170.0000.00818.66
8.1.160.0020.00519.01
8.1.150.0000.00718.90
8.1.140.0000.00720.35
8.1.130.0000.00717.46
8.1.120.0000.00717.50
8.1.110.0050.00217.49
8.1.100.0080.00017.51
8.1.90.0050.00217.45
8.1.80.0050.00317.50
8.1.70.0030.00317.47
8.1.60.0040.00417.45
8.1.50.0000.00917.57
8.1.40.0040.00817.47
8.1.30.0060.00317.67
8.1.20.0040.00417.68
8.1.10.0000.00717.54
8.1.00.0030.00517.54
8.0.300.0030.00620.14
8.0.290.0000.00816.75
8.0.280.0000.00718.51
8.0.270.0040.00417.32
8.0.260.0040.00416.86
8.0.250.0000.00717.06
8.0.240.0000.00617.07
8.0.230.0030.00316.97
8.0.220.0000.00816.98
8.0.210.0030.00517.00
8.0.200.0000.00816.97
8.0.190.0070.00016.97
8.0.180.0040.00417.01
8.0.170.0080.00017.06
8.0.160.0000.00717.12
8.0.150.0040.00417.02
8.0.140.0080.00017.03
8.0.130.0030.00313.48
8.0.120.0070.00017.03
8.0.110.0060.00316.93
8.0.100.0000.00816.92
8.0.90.0030.00616.88
8.0.80.0120.00316.98
8.0.70.0040.00416.92
8.0.60.0070.00016.87
8.0.50.0060.00317.12
8.0.30.0120.00917.02
8.0.20.0080.01117.06
8.0.10.0050.00217.02
8.0.00.0070.01317.04
7.4.330.0050.00016.85
7.4.320.0060.00016.51
7.4.300.0040.00416.50
7.4.290.0030.00616.62
7.4.280.0030.00616.41
7.4.270.0070.00016.53
7.4.260.0050.00013.27
7.4.250.0030.00316.38
7.4.240.0030.00516.50
7.4.230.0000.00716.44
7.4.220.0050.00216.47
7.4.210.0080.00716.52
7.4.200.0040.00416.33
7.4.130.0140.01116.42
7.4.120.0080.01116.38
7.4.110.0040.01416.55
7.4.100.0120.00916.64
7.4.90.0140.01016.64
7.4.80.0120.00919.39
7.4.70.0040.01516.61
7.4.60.0160.00316.72
7.4.50.0100.00616.41
7.4.40.0030.01516.58
7.4.00.0050.01215.01
7.3.330.0000.00716.43
7.3.320.0050.00013.32
7.3.310.0070.00016.51
7.3.300.0030.00316.51
7.3.290.0000.00716.47
7.3.280.0000.01416.49
7.3.260.0120.00716.56
7.3.240.0090.00916.52
7.3.230.0140.01116.39
7.3.210.0100.01316.50
7.3.200.0090.00916.53
7.3.190.0070.01416.38
7.3.180.0030.01816.41
7.3.170.0070.01016.55
7.3.160.0130.00916.52
7.3.120.0040.01514.83
7.3.110.0120.00614.99
7.3.100.0050.00914.89
7.3.90.0090.00614.88
7.3.80.0100.00614.84
7.3.70.0050.00814.85
7.3.60.0070.01414.81
7.3.50.0070.00814.73
7.3.40.0060.00914.95
7.3.30.0090.00814.81
7.3.20.0030.01016.73
7.3.10.0100.00616.69
7.3.00.0090.00816.60
7.2.330.0140.01116.68
7.2.320.0060.01416.61
7.2.310.0000.01816.64
7.2.300.0100.00716.69
7.2.290.0130.00916.68
7.2.250.0030.00914.80
7.2.240.0100.01015.09
7.2.230.0110.00514.98
7.2.220.0080.00714.97
7.2.210.0080.00515.26
7.2.200.0110.00414.78
7.2.190.0130.00515.12
7.2.180.0070.00915.11
7.2.170.0080.00715.18
7.2.160.0080.00915.10
7.2.150.0090.01016.70
7.2.140.0100.01316.62
7.2.130.0090.00916.63
7.2.120.0080.01216.95
7.2.110.0140.00716.96
7.2.100.0100.01316.86
7.2.90.0120.00816.91
7.2.80.0170.00617.11
7.2.70.0120.00916.72
7.2.60.0090.01316.95
7.2.50.0090.01216.97
7.2.40.0070.01617.07
7.2.30.0120.00916.95
7.2.20.0110.01117.00
7.2.10.0090.01316.98
7.2.00.0060.01216.80
7.1.330.0150.00015.95
7.1.320.0060.00715.65
7.1.310.0060.01115.68
7.1.300.0090.00515.79
7.1.290.0030.01215.65
7.1.280.0120.00315.73
7.1.270.0100.00315.75
7.1.260.0070.00815.75
7.1.250.0090.01115.84

preferences:
63.3 ms | 401 KiB | 5 Q