3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $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.60.0150.00318.52
8.3.50.0140.00716.51
8.3.40.0070.00718.79
8.3.30.0070.00718.67
8.3.20.0040.00419.73
8.3.10.0030.00620.83
8.3.00.0050.00323.57
8.2.180.0120.00925.92
8.2.170.0040.01418.99
8.2.160.0110.00322.96
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00020.47
8.2.120.0040.00426.35
8.2.110.0090.00020.30
8.2.100.0030.00918.03
8.2.90.0000.00817.75
8.2.80.0050.00318.82
8.2.70.0030.00517.88
8.2.60.0040.00417.63
8.2.50.0040.00417.75
8.2.40.0000.00819.48
8.2.30.0000.00720.31
8.2.20.0040.00418.02
8.2.10.0070.00018.16
8.2.00.0060.00319.92
8.1.280.0000.01425.92
8.1.270.0070.00323.99
8.1.260.0040.00426.35
8.1.250.0000.00928.09
8.1.240.0060.00623.77
8.1.230.0070.00420.80
8.1.220.0080.00017.77
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0050.00317.23
8.1.180.0000.00818.10
8.1.170.0000.00817.62
8.1.160.0000.00818.82
8.1.150.0000.00820.18
8.1.140.0030.00519.70
8.1.130.0030.00320.79
8.1.120.0040.00417.48
8.1.110.0040.00417.40
8.1.100.0040.00417.40
8.1.90.0030.00517.22
8.1.80.0040.00417.38
8.1.70.0070.00017.40
8.1.60.0030.00617.60
8.1.50.0040.00417.48
8.1.40.0040.00417.52
8.1.30.0030.00517.65
8.1.20.0060.00317.54
8.1.10.0030.00517.43
8.1.00.0030.00517.43
8.0.300.0070.00018.77
8.0.290.0050.00216.88
8.0.280.0030.00318.46
8.0.270.0040.00417.13
8.0.260.0030.00317.19
8.0.250.0070.00016.93
8.0.240.0040.00417.01
8.0.230.0000.00817.05
8.0.220.0000.00716.83
8.0.210.0030.00316.93
8.0.200.0000.00716.91
8.0.190.0000.00817.00
8.0.180.0040.00416.97
8.0.170.0020.00516.88
8.0.160.0090.00016.85
8.0.150.0040.00416.91
8.0.140.0070.00016.90
8.0.130.0030.00313.38
8.0.120.0030.00516.93
8.0.110.0000.00716.75
8.0.100.0000.00716.99
8.0.90.0070.00016.84
8.0.80.0000.01516.97
8.0.70.0020.00516.84
8.0.60.0070.00016.85
8.0.50.0070.00016.82
8.0.30.0090.00917.02
8.0.20.0130.00817.40
8.0.10.0000.00716.89
8.0.00.0090.00916.70
7.4.330.0000.00615.55
7.4.320.0000.00616.57
7.4.300.0000.00716.41
7.4.290.0000.00716.56
7.4.280.0050.00216.58
7.4.270.0000.00716.51
7.4.260.0080.00016.56
7.4.250.0050.00216.60
7.4.240.0080.00016.44
7.4.230.0030.00316.51
7.4.220.0190.00616.56
7.4.210.0100.00516.56
7.4.200.0030.00316.40
7.4.160.0110.00516.60
7.4.150.0140.00417.40
7.4.140.0130.00817.86
7.4.130.0080.01216.52
7.4.120.0090.00716.54
7.4.110.0080.01216.56
7.4.100.0120.00616.48
7.4.90.0070.01116.56
7.4.80.0080.01419.39
7.4.70.0030.01316.57
7.4.60.0040.01116.43
7.4.50.0110.00316.39
7.4.40.0040.01416.59
7.4.30.0060.01016.45
7.4.00.0080.00815.20
7.3.330.0000.00513.39
7.3.320.0000.00513.37
7.3.310.0030.00316.47
7.3.300.0000.00716.23
7.3.290.0030.00316.26
7.3.280.0070.01016.36
7.3.270.0150.00917.40
7.3.260.0110.00616.45
7.3.250.0110.00816.49
7.3.240.0130.00616.44
7.3.230.0110.00816.48
7.3.210.0100.00716.49
7.3.200.0160.00016.65
7.3.190.0060.01016.41
7.3.180.0100.00616.42
7.3.170.0060.01016.33
7.3.160.0150.01016.59
7.2.330.0150.00416.42
7.2.320.0070.01016.44
7.2.310.0140.00716.74
7.2.300.0090.00916.68
7.2.290.0040.01216.48
7.2.60.0000.01417.00
7.2.00.0090.00619.19
7.1.200.0150.00015.33
7.1.100.0040.00817.73
7.1.70.0140.00516.62
7.1.60.0140.00017.15
7.1.50.0070.01716.85
7.1.20.2470.06338.51
7.1.10.1830.06720.37
7.1.00.2630.06320.51
7.0.200.0000.01516.78
7.0.160.2070.06320.05
7.0.150.2400.06020.14
7.0.140.2470.06020.01
7.0.130.3100.06720.11
7.0.120.3970.06020.21
7.0.110.2370.05720.00
7.0.100.2300.07020.03
7.0.90.2070.06020.20
7.0.80.2230.06720.11
7.0.70.1970.06320.13
7.0.60.2430.04720.07
7.0.50.2130.06720.04
7.0.40.2970.07320.02
7.0.30.2970.05320.12
7.0.20.2300.05019.96
7.0.10.1970.05320.18
7.0.00.3200.06319.95

preferences:
64.2 ms | 400 KiB | 5 Q