3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() { static $x = 1; return $x; static $x = 2; } echo f();

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.20.0110.00726.10
8.4.10.0080.00823.60
8.3.140.0000.00716.79
8.3.130.0080.00016.57
8.3.120.0170.00320.34
8.3.110.0000.00916.54
8.3.100.0080.00016.61
8.3.90.0060.01226.77
8.3.80.0040.00716.75
8.3.70.0070.01116.50
8.3.60.0040.01116.50
8.3.50.0100.00716.55
8.3.40.0100.00320.28
8.3.30.0030.01018.54
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.260.0090.00918.06
8.2.250.0070.00316.49
8.2.240.0030.00718.21
8.2.230.0060.00320.94
8.2.220.0150.00024.06
8.2.210.0040.00426.77
8.2.200.0060.00318.16
8.2.190.0060.00916.58
8.2.180.0110.00416.32
8.2.170.0070.00718.83
8.2.160.0100.00322.96
8.2.150.0000.00825.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.66
8.2.110.0060.00320.35
8.2.100.0060.00617.84
8.2.90.0030.00617.53
8.2.80.0110.00517.31
8.2.70.0130.00424.13
8.2.60.0130.00421.01
8.2.50.0110.00619.91
8.2.40.0120.00420.08
8.2.30.0110.00620.07
8.2.20.0100.00520.07
8.2.10.0120.00520.07
8.2.00.0120.00520.10
8.1.310.0100.00016.57
8.1.300.0120.00615.99
8.1.290.0060.00330.84
8.1.280.0040.01125.92
8.1.270.0130.00723.78
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00922.05
8.1.230.0110.00022.15
8.1.220.0080.00816.91
8.1.210.0140.00316.97
8.1.200.0100.00523.96
8.1.190.0090.00721.15
8.1.180.0120.00419.95
8.1.170.0110.00520.03
8.1.160.0110.00620.03
8.1.150.0120.00520.01
8.1.140.0110.00520.02
8.1.130.0110.00620.04
8.1.120.0120.00520.02
8.1.110.0120.00520.02
8.1.100.0120.00520.01
8.1.90.0110.00620.03
8.1.80.0120.00520.02
8.1.70.0110.00520.02
8.1.60.0140.00520.05
8.1.50.0130.00520.04
8.1.40.0130.00520.06
8.1.30.0130.00520.05
8.1.20.0120.00620.05
8.1.10.0120.00620.05
8.1.00.0130.00520.04
8.0.300.0060.00321.50
8.0.290.0100.00623.58
8.0.280.0110.00519.79
8.0.270.0130.00419.92
8.0.260.0130.00419.91
8.0.250.0120.00519.93
8.0.240.0110.00519.92
8.0.230.0120.00519.91
8.0.220.0120.00519.92
8.0.210.0110.00519.91
8.0.200.0120.00519.93
8.0.190.0120.00519.92
8.0.180.0120.00519.92
8.0.170.0120.00519.92
8.0.160.0120.00419.92
8.0.150.0120.00519.91
8.0.140.0120.00519.92
8.0.130.0120.00419.91
8.0.120.0120.00419.93
8.0.110.0120.00419.92
8.0.100.0120.00519.94
8.0.90.0110.00419.92
8.0.80.0120.00419.92
8.0.70.0100.00519.95
8.0.60.0110.00519.92
8.0.50.0110.00519.92
8.0.30.0100.00619.93
8.0.20.0120.00519.92
8.0.10.0110.00519.94

preferences:
54.6 ms | 403 KiB | 5 Q