3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['a','b','c']; foreach ($arr as $dummy) { $arr = [1,2,3]; var_dump($dummy); } var_dump($arr);

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.1.130.0000.00717.39
8.1.120.0040.00317.39
8.1.110.0030.00617.46
8.1.100.0040.00317.45
8.1.90.0000.00717.35
8.1.80.0030.00517.46
8.1.70.0000.00717.37
8.1.60.0040.00417.34
8.1.50.0040.00417.54
8.1.40.0000.00817.52
8.1.30.0040.00417.66
8.1.20.0070.00017.54
8.1.10.0000.00817.47
8.1.00.0040.00417.24
8.0.260.0000.00718.52
8.0.250.0030.00316.97
8.0.240.0050.00317.00
8.0.230.0020.00516.95
8.0.220.0030.00316.80
8.0.210.0030.00316.89
8.0.200.0000.01016.87
8.0.190.0080.00016.97
8.0.180.0040.00416.84
8.0.170.0080.00016.92
8.0.160.0000.00816.89
8.0.150.0070.00016.81
8.0.140.0030.00616.73
8.0.130.0030.00313.27
8.0.120.0020.00615.10
8.0.110.0040.00415.03
8.0.100.0040.00415.03
8.0.90.0040.00415.12
8.0.80.0050.00815.06
8.0.70.0130.00615.06
8.0.60.0110.00415.08
8.0.50.0090.00615.03
8.0.30.0050.01015.12
8.0.20.0070.00715.13
8.0.10.0130.00315.24
8.0.00.0010.00915.22
7.4.330.0020.00215.55
7.4.320.0060.00016.46
7.4.300.0030.00316.49
7.4.290.0040.00416.56
7.4.280.0080.00016.48
7.4.270.0030.00316.49
7.4.260.0020.00516.61
7.4.250.0030.00514.85
7.4.240.0040.00414.90
7.4.230.0040.00314.86
7.4.220.0050.00414.98
7.4.210.0110.00714.89
7.4.200.0090.00614.94
7.4.190.0090.00715.03
7.4.180.0100.00514.91
7.4.160.0060.00814.91
7.4.150.0080.00614.94
7.4.140.0070.00814.86
7.4.130.0080.00814.83
7.4.120.0120.00414.86
7.4.110.0060.01014.76
7.4.100.0080.00814.85
7.4.90.0110.00414.80
7.4.80.0060.00814.83
7.4.70.0060.00714.72
7.4.60.0080.00514.73
7.4.50.0060.00714.71
7.4.40.0060.00814.74
7.4.30.0100.00314.84
7.4.20.0090.00314.87
7.4.10.0080.00514.82
7.4.00.0050.00614.85
7.3.330.0000.00616.35
7.3.320.0030.00313.02
7.3.310.0000.00814.75
7.3.300.0030.00314.51
7.3.290.0090.00314.58
7.3.280.0080.00514.72
7.3.270.0120.00114.73
7.3.260.0090.00514.60
7.3.250.0070.00614.63
7.3.240.0080.00514.64
7.3.230.0100.00214.69
7.3.220.0100.00414.51
7.3.210.0080.00814.52
7.3.200.0100.00314.53
7.3.190.0080.00514.58
7.3.180.0090.00414.52
7.3.170.0040.00914.56
7.3.160.0060.00714.55
7.3.150.0120.00214.64
7.3.140.0090.00514.66
7.3.130.0110.00314.61
7.3.120.0080.00514.64
7.3.110.0060.00614.54
7.3.100.0070.00714.50
7.3.90.0120.00214.92
7.3.80.0080.00714.61
7.3.70.0110.00614.78
7.3.60.0030.01014.79
7.3.50.0020.01114.72
7.3.40.0070.00414.80
7.3.30.0030.00914.84
7.3.20.0100.00415.63
7.3.10.0050.00715.59
7.3.00.0200.00515.59

preferences:
13.24 ms | 406 KiB | 5 Q