3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $classStatic = 1; public function test() { static $methodStatic = 1; return $methodStatic++; } } class Bar extends Foo {} $foo1 = new Foo; $foo2 = new Foo; $bar = new Bar; var_dump( $foo1->test(), $foo2->test(), $bar->test() ); Foo::$classStatic++; var_dump( Foo::$classStatic, Bar::$classStatic );

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.40.0040.01118.58
8.3.30.0110.00418.81
8.3.20.0080.00019.69
8.3.10.0030.00620.40
8.3.00.0070.00023.65
8.2.170.0140.00718.70
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0130.00626.16
8.2.120.0080.00021.04
8.2.110.0060.00320.41
8.2.100.0060.00617.80
8.2.90.0040.00419.20
8.2.80.0060.00317.97
8.2.70.0080.00517.38
8.2.60.0000.01018.05
8.2.50.0000.00819.39
8.2.40.0060.00320.59
8.2.30.0070.00020.42
8.2.20.0000.00718.11
8.2.10.0070.00018.12
8.2.00.0000.00718.18
8.1.270.0030.00520.69
8.1.260.0000.01026.35
8.1.250.0050.00328.09
8.1.240.0090.00021.09
8.1.230.0060.00619.09
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0000.00918.66
8.1.160.0070.00018.89
8.1.150.0030.00320.14
8.1.140.0060.00317.45
8.1.130.0000.00720.67
8.1.120.0000.00817.42
8.1.110.0070.00017.50
8.1.100.0070.00017.27
8.1.90.0000.00717.44
8.1.80.0000.00817.29
8.1.70.0030.00317.28
8.1.60.0040.00417.47
8.1.50.0000.00817.40
8.1.40.0030.00617.48
8.1.30.0000.00717.54
8.1.20.0080.00017.53
8.1.10.0040.00417.45
8.1.00.0000.00717.40
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0040.00418.50
8.0.270.0030.00317.36
8.0.260.0080.00017.16
8.0.250.0030.00316.93
8.0.240.0000.00816.85
8.0.230.0000.00716.88
8.0.220.0070.00016.89
8.0.210.0030.00316.95
8.0.200.0030.00316.95
8.0.190.0050.00316.97
8.0.180.0000.00716.83
8.0.170.0040.00416.93
8.0.160.0040.00416.80
8.0.150.0080.00316.89
8.0.140.0000.00716.83
8.0.130.0000.00513.25
8.0.120.0000.00816.86
8.0.110.0000.00816.95
8.0.100.0030.00316.84
8.0.90.0080.00016.89
8.0.80.0030.01216.77
8.0.70.0040.00416.72
8.0.60.0020.00516.86
8.0.50.0050.00316.67
8.0.30.0130.00517.14
8.0.20.0110.00817.40
8.0.10.0070.00017.08
8.0.00.0150.00816.59
7.4.330.0000.00615.55
7.4.320.0040.00416.54
7.4.300.0070.00016.58
7.4.290.0050.00316.54
7.4.280.0090.00016.46
7.4.270.0030.00316.57
7.4.260.0000.00716.54
7.4.250.0050.00216.58
7.4.240.0000.00716.60
7.4.230.0070.00016.70
7.4.220.0060.01616.55
7.4.210.0030.01116.63
7.4.200.0030.00316.35
7.4.160.0060.00916.45
7.4.150.0100.00717.40
7.4.140.0110.00617.86
7.4.130.0080.01116.49
7.4.120.0080.01116.50
7.4.110.0090.01016.47
7.4.100.0090.00916.49
7.4.90.0100.00716.34
7.4.80.0170.00319.39
7.4.70.0090.00816.54
7.4.60.0070.01016.45
7.4.50.0000.01216.55
7.4.40.0100.00716.46
7.4.30.0090.01116.38
7.4.00.0000.01214.90
7.3.330.0050.00013.14
7.3.320.0000.00513.17
7.3.310.0070.00016.27
7.3.300.0030.00316.31
7.3.290.0050.00216.31
7.3.280.0100.00916.30
7.3.270.0000.01617.40
7.3.260.0140.00516.41
7.3.250.0110.00616.43
7.3.240.0100.01016.48
7.3.230.0170.00316.39
7.3.210.0140.00316.52
7.3.200.0100.00716.42
7.3.190.0110.01116.64
7.3.180.0070.01016.18
7.3.170.0040.01116.30
7.3.160.0230.00016.38
7.2.330.0030.01316.70
7.2.320.0090.00916.73
7.2.310.0110.00516.75
7.2.300.0090.01316.72
7.2.290.0100.01016.38
7.2.60.0080.00416.98
7.1.200.0060.00815.76
7.1.70.0000.00816.76
7.1.60.0000.01317.13
7.1.20.0370.05740.32
7.1.10.0130.06322.15
7.1.00.0130.05722.36
7.0.200.0040.01116.60
7.0.160.0070.07021.91
7.0.150.0170.05021.72
7.0.140.0070.06321.91
7.0.130.0100.05322.02
7.0.120.0130.05021.91
7.0.110.0070.06321.87
7.0.100.0000.06721.95
7.0.90.0170.05021.97
7.0.80.0130.07321.93
7.0.70.0100.05021.91
7.0.60.0070.06021.78
7.0.50.0070.06321.81
7.0.40.0070.05721.79
7.0.30.0070.06021.89
7.0.20.0070.05721.86
7.0.10.0130.05721.83
7.0.00.0100.08721.84

preferences:
58.61 ms | 400 KiB | 5 Q