3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait foo { static $bar = []; public function a() { static::$bar = ["foo"]; echo "Goodbye Moon"; } } class bing { use foo; public function a() { foo::a(); var_dump(self::$bar, foo::$bar); } public function b() { foo::a(); self::$bar[] = "bat"; var_dump(self::$bar, foo::$bar); } } $bing = new bing; $bing->a(); $bing->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)
8.3.70.0120.00918.43
8.3.60.0030.01416.50
8.3.50.0160.00721.13
8.3.40.0100.00718.84
8.3.30.0070.00718.67
8.3.20.0040.00420.16
8.3.10.0000.00823.68
8.3.00.0050.00322.57
8.2.190.0040.01416.75
8.2.180.0140.00418.35
8.2.170.0070.00722.96
8.2.160.0100.00321.94
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0090.00026.16
8.2.120.0030.00617.63
8.2.110.0080.01221.99
8.2.100.0080.00317.78
8.2.90.0060.00317.97
8.2.80.0050.00318.05
8.2.70.0030.00617.93
8.2.60.0000.00818.22
8.2.50.0030.00618.10
8.2.40.0040.00419.47
8.2.30.0000.00819.17
8.2.20.0000.00717.66
8.2.10.0000.00817.99
8.2.00.0050.00318.05
8.1.280.0160.00325.92
8.1.270.0040.00423.80
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00022.56
8.1.230.0040.00820.97
8.1.220.0000.00817.76
8.1.210.0030.00618.77
8.1.200.0060.00617.48
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0070.00018.85
8.1.150.0000.00718.89
8.1.140.0070.00017.45
8.1.130.0030.00317.43
8.1.120.0040.00417.49
8.1.110.0030.00617.45
8.1.100.0000.00717.35
8.1.90.0080.00317.46
8.1.80.0030.00617.43
8.1.70.0030.00317.50
8.1.60.0060.00317.61
8.1.50.0030.00517.57
8.1.40.0000.00717.54
8.1.30.0000.00817.59
8.1.20.0040.00417.67
8.1.10.0030.00617.60
8.1.00.0080.00017.48
8.0.300.0030.00621.44
8.0.290.0050.00216.75
8.0.280.0040.00418.45
8.0.270.0000.00817.22
8.0.260.0030.00316.78
8.0.250.0040.00416.92
8.0.240.0000.00816.99
8.0.230.0000.00817.01
8.0.220.0030.00316.98
8.0.210.0000.00717.01
8.0.200.0070.00016.95
8.0.190.0070.00017.02
8.0.180.0030.00616.86
8.0.170.0000.00816.90
8.0.160.0030.00317.02
8.0.150.0000.00716.94
8.0.140.0030.00616.92
8.0.130.0000.00613.42
8.0.120.0080.00016.92
8.0.110.0070.00016.84
8.0.100.0000.00816.99
8.0.90.0000.00716.84
8.0.80.0100.00916.95
8.0.70.0060.00316.91
8.0.60.0080.00016.75
8.0.50.0000.00716.99
8.0.30.0110.01017.01
8.0.20.0080.01017.40
8.0.10.0070.00016.94
8.0.00.0070.01016.68
7.4.330.0020.00215.19
7.4.320.0030.00316.45
7.4.300.0060.00016.60
7.4.290.0060.00316.51
7.4.280.0040.00416.38
7.4.270.0000.00716.60
7.4.260.0000.00816.58
7.4.250.0040.00416.57
7.4.240.0050.00216.57
7.4.230.0030.00316.71
7.4.220.0110.01416.44
7.4.210.0120.00316.54
7.4.200.0070.00016.60
7.4.150.0080.01117.40
7.4.140.0120.01217.86
7.4.130.0100.00816.63
7.4.120.0080.01016.48
7.4.110.0080.00816.44
7.4.100.0220.00016.44
7.4.90.0120.00616.64
7.4.80.0110.00919.39
7.4.70.0040.01116.73
7.4.60.0100.00716.45
7.4.50.0080.00016.56
7.4.40.0100.00716.57
7.4.30.0150.00616.50
7.4.00.0070.00715.14
7.3.330.0050.00013.18
7.3.320.0050.00013.43
7.3.310.0050.00316.46
7.3.300.0030.00316.31
7.3.290.0070.00816.38
7.3.280.0080.00916.34
7.3.270.0140.00517.40
7.3.260.0100.01316.52
7.3.250.0100.01016.56
7.3.240.0060.01316.39
7.3.230.0080.00816.55
7.3.210.0110.00716.57
7.3.200.0120.00916.34
7.3.190.0070.01016.54
7.3.180.0100.00716.63
7.3.170.0120.00816.45
7.3.160.0100.00716.45
7.2.330.0060.01216.70
7.2.320.0130.00316.38
7.2.310.0140.01016.66
7.2.300.0140.00316.74
7.2.290.0040.01416.71
7.2.60.0100.00716.83
7.2.00.0130.00719.56
7.1.200.0000.01315.70
7.1.100.0110.01117.96
7.1.70.0030.00917.09
7.1.60.0100.01319.18
7.1.50.0070.01816.89
7.1.00.0070.07322.36
7.0.200.0140.00716.78
7.0.60.0130.04719.92
7.0.50.0070.04317.73
7.0.40.0100.08320.20
7.0.30.0270.08720.34
7.0.20.0230.03320.25
7.0.10.0070.06320.16
7.0.00.0070.04320.30
5.6.280.0000.08720.87
5.6.210.0100.04020.48
5.6.200.0130.08018.22
5.6.190.0070.06320.47
5.6.180.3170.03320.33
5.6.170.0270.06320.45
5.6.160.0100.08720.55
5.6.150.0070.04718.21
5.6.140.0030.04018.18
5.6.130.0070.08018.14
5.6.120.0130.07321.13
5.6.110.0030.05721.14
5.6.100.0130.07020.97
5.6.90.0070.03721.10
5.6.80.0070.06020.40
5.6.70.4470.04720.42
5.5.350.0300.07020.42
5.5.340.0000.04318.02
5.5.330.0130.07720.30
5.5.320.0300.02720.27
5.5.310.0270.05020.37
5.5.300.0070.05318.04
5.5.290.0030.08317.95
5.5.280.0130.04720.98
5.5.270.0100.03720.88
5.5.260.0100.05720.85
5.5.250.0130.06020.61
5.5.240.0500.05020.32
5.4.450.0900.05719.34
5.4.440.0970.05719.55
5.4.430.0770.05019.60
5.4.420.0900.06319.65
5.4.410.0870.06319.57
5.4.400.0970.05019.37
5.4.390.0900.05018.98
5.4.380.0770.06319.02
5.4.370.0870.04719.15
5.4.360.0870.05719.00
5.4.350.1070.04319.14
5.4.340.0770.05319.14
5.4.320.0970.06719.29
5.4.310.0730.05019.06
5.4.300.0700.05719.28
5.4.290.0900.06018.84
5.4.280.0730.05019.14
5.4.270.0830.06719.25
5.4.260.1000.04718.97
5.4.250.0930.05018.84
5.4.240.1070.06319.16
5.4.230.0830.05719.28
5.4.220.0700.05719.22
5.4.210.0800.05719.03
5.4.200.0630.05316.79
5.4.190.0730.05018.93
5.4.180.0700.06719.17
5.4.170.0930.04719.30
5.4.160.0700.05718.96
5.4.150.0700.05719.17
5.4.140.0870.05016.56
5.4.130.0770.04716.55
5.4.120.0700.05316.63
5.4.110.0630.04316.32
5.4.100.0130.04716.27
5.4.90.0100.05016.33
5.4.80.0270.05716.70
5.4.70.0830.04316.38
5.4.60.0170.04016.48
5.4.50.0000.05316.16
5.4.40.0330.05716.26
5.4.30.0000.04716.53
5.4.20.0400.05316.43

preferences:
39.86 ms | 401 KiB | 5 Q