3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['one', 'two', 'three', 'four', 'five']; echo 'Current value: ' . current($arr) . "\n"; foreach ($arr as $a) { if ($a === 'three') break; } echo 'Did it change? ' . current($arr) . "\n"; function withRef(array &$arr): void { foreach ($arr as $a) { if ($a === 'three') break; } } withRef($arr); echo 'What about now? ' . current($arr) . "\n";

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.5.00.0120.01121.38
8.4.150.0030.00014.05
8.4.140.0100.01017.75
8.4.130.0140.00817.72
8.4.120.0120.00917.83
8.4.110.0120.00923.72
8.4.100.0130.00917.69
8.4.90.0050.00720.31
8.4.80.0100.00918.72
8.4.70.0140.00518.85
8.4.60.0140.00620.42
8.4.50.0100.01018.82
8.4.40.0050.00517.73
8.4.30.0070.01318.93
8.4.20.0120.00821.49
8.4.10.0090.00919.38
8.3.280.0120.00918.38
8.3.270.0100.01016.49
8.3.260.0110.00816.72
8.3.250.0110.00718.82
8.3.240.0090.00816.54
8.3.230.0020.00716.56
8.3.220.0080.01018.76
8.3.210.0090.00916.54
8.3.200.0040.00516.52
8.3.190.0130.00617.07
8.3.180.0080.00716.80
8.3.170.0100.00720.72
8.3.160.0100.00716.84
8.3.150.0120.00617.15
8.3.140.0090.00916.65
8.3.130.0050.00318.44
8.3.120.0000.00920.75
8.3.110.0040.00420.94
8.3.100.0050.00324.06
8.3.90.0050.00326.77
8.3.80.0060.00318.30
8.3.70.0140.00917.81
8.3.60.0060.00317.84
8.3.50.0120.00017.84
8.2.290.0080.00816.87
8.2.280.0060.00720.21
8.2.270.0040.01417.26
8.2.260.0120.00318.21
8.2.250.0080.00016.73
8.2.240.0030.00617.06
8.2.230.0100.00022.58
8.2.220.0110.00037.54
8.2.210.0080.00026.77
8.2.200.0030.00618.17
8.2.190.0060.00318.54
8.2.180.0090.00018.41
8.1.330.0120.00716.05
8.1.320.0110.01118.07
8.1.310.0070.00416.54
8.1.300.0120.00420.18
8.1.290.0030.00630.84
8.1.280.0060.00317.84
7.4.330.0140.00317.97
5.5.210.0130.00217.84

preferences:
34.64 ms | 403 KiB | 5 Q