3v4l.org

run code in 300+ PHP versions simultaneously
<?php function swap($x, $y) { $x = $x + 1; $y = $y + 2; return $x * $y; } $a = 3; $b = swap($a, $a); print "$a, $b"; $b = swap(&$a, &$a); print "$a, $b";

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.0.10.0070.04320.09
7.0.00.0230.07020.20
5.6.160.0070.04320.50
5.6.150.0100.07318.14
5.6.140.0030.04018.16
5.6.130.0030.06018.19
5.6.120.0100.03321.02
5.6.110.0100.06320.95
5.6.100.0170.07721.13
5.6.90.0030.04321.11
5.6.80.0030.08020.47
5.5.300.0100.07717.95
5.5.290.0030.04017.94
5.5.280.0130.07720.80
5.5.270.0070.05020.80
5.5.260.0100.06720.88
5.5.250.0030.04320.66
5.5.240.0170.06020.06
5.4.450.0490.05619.55
5.4.440.0390.05819.30
5.4.430.0470.05119.39
5.4.420.0510.04619.42
5.4.410.0460.05119.27
5.4.400.0510.05119.09
5.4.390.0530.05119.02
5.4.380.0510.05219.06
5.4.370.0480.05019.08
5.4.360.0420.05719.11
5.4.350.0490.04819.02
5.4.340.0390.06019.10
5.4.320.0460.05319.10
5.4.310.0580.05119.14
5.4.300.0490.04819.16
5.4.290.0420.05719.21
5.4.280.0430.05419.21
5.4.270.0430.05319.16
5.4.260.0460.04919.12
5.4.250.0430.05319.05
5.4.240.0400.05419.09
5.4.230.0470.04919.14
5.4.220.0430.05419.25
5.4.210.0470.06419.16
5.4.200.0480.06219.08
5.4.190.0430.05419.18
5.4.180.0530.05119.18
5.4.170.0490.05319.16
5.4.160.0540.04819.08
5.4.150.0460.05219.22
5.4.140.0580.04916.54
5.4.130.0530.04116.45
5.4.120.0460.04916.53
5.4.110.0430.05316.52
5.4.100.0700.05016.60
5.4.90.0830.03716.63
5.4.80.0700.05316.49
5.4.70.0670.05716.57
5.4.60.0770.04316.52
5.4.50.0700.05316.61
5.4.40.0730.05016.54
5.4.30.0700.06016.21
5.4.20.0670.05716.58
5.4.10.0670.05716.38
5.4.00.0800.03716.03
5.3.290.0490.05714.66
5.3.280.0420.05114.61
5.3.270.0470.05414.53
5.3.260.0540.05214.62
5.3.250.0460.05214.62
5.3.240.0410.05414.59
5.3.230.0490.04914.57
5.3.220.0480.04914.55
5.3.210.0470.05114.57
5.3.200.0730.05014.39
5.3.190.0770.05014.63
5.3.180.0800.05314.61
5.3.170.0700.05014.57
5.3.160.0770.04714.57
5.3.150.0700.05714.57
5.3.140.0770.04314.71
5.3.130.0700.06014.69
5.3.120.0730.05314.59
5.3.110.0770.05014.69
5.3.100.0800.05014.00
5.3.90.0670.05014.09
5.3.80.0670.05013.94
5.3.70.0670.04714.09
5.3.60.0530.05014.00
5.3.50.0830.04713.92
5.3.40.0800.04313.96
5.3.30.0500.05013.90
5.3.20.0600.05713.69
5.3.10.0330.04713.80
5.3.00.0170.04313.46
5.2.170.0670.03011.14
5.2.160.0530.04311.22
5.2.150.0600.03711.14
5.2.140.0530.04311.14
5.2.130.0470.05011.26
5.2.120.0630.03311.07
5.2.110.0100.03711.00
5.2.100.0370.04711.06
5.2.90.0500.04311.09
5.2.80.0530.04311.04
5.2.70.0200.04011.15
5.2.60.0130.03311.01
5.2.50.0100.03711.01
5.2.40.0200.04011.00
5.2.30.0400.03710.97
5.2.20.0400.03710.96
5.2.10.0430.04010.87
5.2.00.0530.04310.72
5.1.60.0400.0309.90
5.1.50.0300.0439.98
5.1.40.0330.03710.00
5.1.30.0430.03010.16
5.1.20.0300.04010.38
5.1.10.0330.0409.91
5.1.00.0470.02710.05
5.0.50.0130.0338.39
5.0.40.0230.0278.38
5.0.30.0270.0408.21
5.0.20.0230.0278.11
5.0.10.0230.0278.08
5.0.00.0330.0338.17
4.4.90.0030.0205.94
4.4.80.0030.0205.95
4.4.70.0130.0276.03
4.4.60.0170.0236.04
4.4.50.0200.0236.05
4.4.40.0200.0336.09
4.4.30.0230.0176.12
4.4.20.0200.0206.14
4.4.10.0230.0176.17
4.4.00.0230.0336.20
4.3.110.0230.0236.21
4.3.100.0230.0206.23
4.3.90.0270.0176.23
4.3.80.0230.0376.25
4.3.70.0300.0136.25
4.3.60.0300.0136.25
4.3.50.0200.0236.25
4.3.40.0070.0436.25
4.3.30.0070.0236.25
4.3.20.0030.0306.25
4.3.10.0030.0236.25
4.3.00.0030.0206.25

preferences:
143.19 ms | 1394 KiB | 7 Q