3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bar() { echo "bar() called\n"; return 1; } function foo() { static $i = bar(); echo $i++, "\n"; } foo(); foo(); foo();

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.4.120.0120.00820.63
8.4.110.0150.00522.55
8.4.100.0110.01017.75
8.4.90.0040.00819.38
8.4.80.0070.00217.72
8.4.70.0170.00817.66
8.4.60.0110.00918.60
8.4.50.0130.00717.58
8.4.40.0130.00720.46
8.4.30.0030.01722.05
8.4.20.0120.00919.76
8.4.10.0060.00324.08
8.3.250.0130.00718.88
8.3.240.0140.00516.81
8.3.230.0120.00716.59
8.3.220.0100.00817.20
8.3.210.0140.00616.76
8.3.200.0050.00516.66
8.3.190.0050.00417.12
8.3.180.0050.00918.32
8.3.170.0040.01417.11
8.3.160.0030.00716.68
8.3.150.0100.00717.17
8.3.140.0090.00016.75
8.3.130.0050.00318.35
8.3.120.0150.01018.49
8.3.110.0190.00719.54
8.3.100.0180.00919.35
8.3.90.0130.01219.65
8.3.80.0210.00716.41
8.3.70.0120.01017.02
8.3.60.0200.00316.41
8.3.50.0130.00419.49
8.3.40.0190.00317.53
8.3.30.0180.00017.40
8.3.20.0110.00617.34
8.3.10.0110.00617.31
8.3.00.0140.00422.59
8.2.290.0140.00520.06
8.2.280.0110.00718.66
8.2.270.0070.01317.15
8.2.260.0060.00916.95
8.2.250.0040.01118.73
8.2.240.0170.00416.68
8.2.230.0170.00419.57
8.2.220.0190.00919.56
8.2.210.0190.00719.60
8.2.200.0210.01116.53
8.2.190.0120.00816.25
8.2.180.0180.00316.38
8.2.170.0160.00517.45
8.2.160.0140.00517.44
8.2.150.0150.00517.43
8.2.140.0190.00017.37
8.2.130.0230.00722.80
8.2.120.0190.00822.68
8.2.110.0220.00722.76
8.2.100.0220.00222.74
8.2.90.0250.00522.71
8.2.80.0250.00622.61
8.2.70.0250.00822.62
8.2.60.0200.00922.70
8.2.50.0120.01222.69
8.2.40.0210.00522.78
8.2.30.0190.00722.71
8.2.20.0180.00622.67
8.2.10.0220.00222.51
8.2.00.0110.00722.60
8.1.330.0110.00721.85
8.1.320.0140.00515.88
8.1.310.0070.01116.70
8.1.300.0110.00615.75
8.1.290.0140.00516.03
8.1.280.0130.00616.03
8.1.270.0200.00017.18
8.1.260.0240.00222.49
8.1.250.0170.00422.71
8.1.240.0080.00822.60
8.1.230.0210.00622.59
8.1.220.0140.01022.56
8.1.210.0130.00922.55
8.1.200.0150.00722.46
8.1.190.0180.00822.49
8.1.180.0240.00522.47
8.1.170.0090.00522.50
8.1.160.0140.00322.49
8.1.150.0080.00522.55
8.1.140.0130.00022.44
8.1.130.0080.00422.50
8.1.120.0090.00422.61
8.1.110.0100.00222.52
8.1.100.0060.00622.62
8.1.90.0100.00322.54
8.1.80.0090.00322.52
8.1.70.0100.00322.53
8.1.60.0090.00422.67
8.1.50.0060.00822.47
8.1.40.0080.00522.64
8.1.30.0120.00122.64
8.1.20.0100.00322.68
8.1.10.0100.00522.49
8.1.00.0150.00522.47
8.0.300.0190.00222.18
8.0.290.0280.00622.08
8.0.280.0190.00522.08
8.0.270.0050.00822.31
8.0.260.0150.00522.28
8.0.250.0230.00422.21
8.0.240.0200.00622.30
8.0.230.0090.00722.37
8.0.220.0100.00622.28
8.0.210.0160.00322.22
8.0.200.0170.00522.29
8.0.190.0140.00622.26
8.0.180.0160.00722.36
8.0.170.0170.00722.07
8.0.160.0170.00722.32
8.0.150.0180.00522.22
8.0.140.0200.00522.19
8.0.130.0110.01122.29
8.0.120.0190.00322.29
8.0.110.0150.00722.13
8.0.100.0230.00222.27
8.0.90.0210.00222.29
8.0.80.0030.00922.32
8.0.70.0080.00422.24
8.0.60.0140.00422.20
8.0.50.0160.00522.26
8.0.30.0140.00922.22
8.0.20.0130.00822.39
8.0.10.0100.00322.38

preferences:
44.89 ms | 403 KiB | 5 Q