3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { protected static $property = 'foo'; public function method() { echo self::$property . "\n"; } } class Child extends Base { public function __construct() { self::$property = 'bar'; } } echo "base1\n"; $base1 = new Base(); $base1->method(); echo "child\n"; $child = new Child(); $child->method(); echo "base2\n"; $base2 = new Base(); $base2->method();

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.0070.00718.89
8.3.30.0100.00319.03
8.3.20.0020.00520.04
8.3.10.0050.00322.05
8.3.00.0050.00322.40
8.2.170.0090.00622.96
8.2.160.0000.01420.89
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00419.23
8.2.110.0060.00322.17
8.2.100.0040.00717.72
8.2.90.0060.00318.85
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0050.00317.80
8.2.50.0000.00818.07
8.2.40.0030.00618.22
8.2.30.0080.00017.98
8.2.20.0040.00417.64
8.2.10.0040.00419.28
8.2.00.0040.00417.56
8.1.270.0040.00423.92
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00323.91
8.1.230.0040.00719.00
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0050.00417.25
8.1.190.0040.00417.40
8.1.180.0080.00018.10
8.1.170.0050.00318.50
8.1.160.0070.00022.02
8.1.150.0000.00718.57
8.1.140.0050.00317.52
8.1.130.0000.00717.77
8.1.120.0040.00417.46
8.1.110.0030.00517.41
8.1.100.0000.00717.32
8.1.90.0040.00417.33
8.1.80.0070.00017.48
8.1.70.0040.00417.33
8.1.60.0070.00017.51
8.1.50.0040.00417.49
8.1.40.0020.00517.42
8.1.30.0000.00817.48
8.1.20.0000.00817.70
8.1.10.0040.00417.55
8.1.00.0000.00717.49
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0030.00518.52
8.0.270.0050.00217.27
8.0.260.0000.00716.74
8.0.250.0070.00016.97
8.0.240.0000.00716.85
8.0.230.0030.00316.93
8.0.220.0000.00716.89
8.0.210.0000.00716.81
8.0.200.0000.00616.89
8.0.190.0040.00417.00
8.0.180.0030.00716.90
8.0.170.0090.00016.92
8.0.160.0040.00416.88
8.0.150.0000.00716.83
8.0.140.0030.00516.82
8.0.130.0040.00313.36
8.0.120.0000.00716.89
8.0.110.0020.00516.76
8.0.100.0030.00316.77
8.0.90.0000.00716.79
8.0.80.0030.01216.86
8.0.70.0030.00516.84
8.0.60.0000.00716.74
8.0.50.0040.00416.89
8.0.30.0130.00617.22
8.0.20.0150.00517.40
8.0.10.0000.00816.99
8.0.00.0100.00716.80
7.4.330.0030.00315.00
7.4.320.0030.00316.34
7.4.300.0050.00216.54
7.4.290.0060.00016.41
7.4.280.0030.00316.50
7.4.270.0070.00016.62
7.4.260.0030.00316.47
7.4.250.0080.00016.48
7.4.240.0070.00016.59
7.4.230.0040.00416.35
7.4.220.0110.00716.50
7.4.210.0070.00716.61
7.4.200.0030.00316.61
7.4.190.0000.00716.65
7.4.160.0150.00816.35
7.4.150.0100.00917.40
7.4.140.0080.01117.86
7.4.130.0110.01216.45
7.4.120.0050.01216.50
7.4.110.0120.00616.60
7.4.100.0120.00816.40
7.4.90.0140.00716.67
7.4.80.0120.00619.39
7.4.70.0070.01016.53
7.4.60.0030.01316.41
7.4.50.0000.00516.43
7.4.40.0040.01122.77
7.4.30.0030.01416.49
7.4.00.0000.01214.68
7.3.330.0050.00013.28
7.3.320.0050.00013.33
7.3.310.0030.00316.32
7.3.300.0030.00316.30
7.3.290.0140.00016.21
7.3.280.0120.00616.31
7.3.270.0060.01517.40
7.3.260.0060.01116.30
7.3.250.0180.00516.29
7.3.240.0050.01016.51
7.3.230.0100.00716.39
7.3.210.0080.01016.61
7.3.200.0160.00619.39
7.3.190.0100.01116.56
7.3.180.0070.01016.49
7.3.170.0070.01616.28
7.3.160.0120.00616.25
7.3.120.0090.00614.80
7.3.10.0090.00916.25
7.3.00.0130.00316.24
7.2.330.0100.00716.33
7.2.320.0100.01316.31
7.2.310.0120.00416.78
7.2.300.0060.01216.41
7.2.290.0070.01116.67
7.2.130.0080.00916.54
7.2.120.0040.01116.73
7.2.110.0070.00916.40
7.2.100.0100.01016.57
7.2.90.0080.00816.84
7.2.80.0110.00616.81
7.2.70.0110.01116.39
7.2.60.0070.01316.56
7.2.50.0120.00516.38
7.2.40.0070.01216.41
7.2.30.0150.00516.80
7.2.20.0040.00916.78
7.2.10.0130.01016.20
7.2.00.0090.00817.54
7.1.250.0110.00515.11
7.1.200.0040.00415.49
7.1.100.0030.01018.00
7.1.70.0080.00517.01
7.1.60.0030.01719.82
7.1.50.0090.01316.89
7.1.00.0000.07322.54
7.0.200.0060.00616.67
7.0.140.0000.08022.21
7.0.60.0100.05019.86
7.0.50.0130.08017.87
7.0.40.0030.05020.13
7.0.30.0300.05020.06
7.0.20.0200.07720.06
7.0.10.0030.09020.19
7.0.00.0100.09020.33
5.6.280.0130.06321.13
5.6.210.0030.08320.55
5.6.200.0030.05718.23
5.6.190.0000.07320.41
5.6.180.0470.07020.52
5.6.170.0430.06320.51
5.6.160.0130.03320.46
5.6.150.0130.07018.21
5.6.140.0100.03718.24
5.6.130.0000.08018.13
5.6.120.0030.04321.03
5.6.110.0030.04321.12
5.6.100.0070.06720.98
5.6.90.0070.07320.95
5.6.80.0100.04320.53
5.5.350.0200.05020.34
5.5.340.0100.07717.99
5.5.330.0030.09020.27
5.5.320.0330.03320.42
5.5.310.0270.05020.42
5.5.300.0100.08017.98
5.5.290.0100.08017.95
5.5.280.0030.04020.99
5.5.270.0130.07720.80
5.5.260.0100.06020.65
5.5.250.0130.07720.70
5.5.240.0030.07720.29
5.4.450.0800.06019.38
5.4.440.0630.06719.55
5.4.430.0030.07019.62
5.4.420.0100.05719.52
5.4.410.0130.05019.00
5.4.400.0170.05318.63
5.4.390.0000.06018.80
5.4.380.0070.06318.51
5.4.370.0300.04018.52
5.4.360.0170.05718.80
5.4.350.0330.04718.72
5.4.340.0230.04718.59
5.4.320.0060.03612.51
5.4.310.0090.03912.50
5.4.300.0060.04412.50
5.4.290.0070.03612.50
5.4.280.0010.05112.40
5.4.270.0040.03712.37
5.4.260.0050.03812.37
5.4.250.0050.03912.37
5.4.240.0070.03412.37
5.4.230.0070.03612.36
5.4.220.0060.03512.36
5.4.210.0060.03412.36
5.4.200.0060.03612.36
5.4.190.0060.03512.35
5.4.180.0050.03612.35
5.4.170.0080.03312.37
5.4.160.0050.03612.36
5.4.150.0060.03512.36
5.4.140.0040.03912.04
5.4.130.0040.04012.03
5.4.120.0060.03411.99
5.4.110.0040.03611.98
5.4.100.0050.03511.98
5.4.90.0060.03611.98
5.4.80.0050.03811.98
5.4.70.0070.03511.98
5.4.60.0070.03411.98
5.4.50.0080.03411.98
5.4.40.0050.03511.96
5.4.30.0040.03711.96
5.4.20.0080.03311.96
5.4.10.0080.03211.96
5.4.00.0060.04411.45
5.3.290.0070.03912.80
5.3.280.0040.04012.71
5.3.270.0090.03812.72
5.3.260.0050.04212.72
5.3.250.0050.03812.72
5.3.240.0060.03712.72
5.3.230.0080.03612.71
5.3.220.0020.04112.68
5.3.210.0090.03612.68
5.3.200.0070.03712.68
5.3.190.0050.03912.67
5.3.180.0080.03512.68
5.3.170.0100.03312.67
5.3.160.0080.03512.67
5.3.150.0080.03512.67
5.3.140.0050.03712.66
5.3.130.0070.04112.66
5.3.120.0080.03812.66
5.3.110.0090.03512.65
5.3.100.0060.04012.12
5.3.90.0080.03412.08
5.3.80.0070.03812.07
5.3.70.0060.03612.07
5.3.60.0060.03712.07
5.3.50.0070.03512.00
5.3.40.0090.03712.00
5.3.30.0130.03211.96
5.3.20.0110.03611.73
5.3.10.0040.03611.70
5.3.00.0100.03211.68
5.2.170.0090.0279.18
5.2.160.0060.0299.18
5.2.150.0050.0369.18
5.2.140.0050.0339.18
5.2.130.0050.0309.14
5.2.120.0040.0299.14
5.2.110.0030.0319.15
5.2.100.0050.0279.15
5.2.90.0070.0299.14
5.2.80.0060.0329.14
5.2.70.0070.0319.14
5.2.60.0080.0319.10
5.2.50.0030.0339.07
5.2.40.0060.0289.05
5.2.30.0120.0279.02
5.2.20.0070.0269.01
5.2.10.0060.0278.93
5.2.00.0020.0318.77
5.1.60.0040.0258.06
5.1.50.0040.0258.06
5.1.40.0020.0278.04
5.1.30.0050.0268.39
5.1.20.0030.0288.42
5.1.10.0050.0258.14
5.1.00.0030.0278.14
5.0.50.0020.0226.61
5.0.40.0030.0206.47
5.0.30.0070.0276.29
5.0.20.0060.0186.26
5.0.10.0060.0206.23
5.0.00.0060.0386.23
4.4.90.0050.0164.78
4.4.80.0020.0164.75
4.4.70.0020.0164.75
4.4.60.0020.0174.75
4.4.50.0040.0154.77
4.4.40.0010.0274.71
4.4.30.0030.0154.76
4.4.20.0000.0184.84
4.4.10.0020.0164.85
4.4.00.0060.0224.76
4.3.110.0070.0154.67
4.3.100.0020.0164.66
4.3.90.0010.0164.63
4.3.80.0040.0234.59
4.3.70.0010.0164.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0020.0244.54
4.3.30.0040.0143.29
4.3.20.0030.0153.26
4.3.10.0020.0153.23
4.3.00.0130.0206.76

preferences:
47.21 ms | 400 KiB | 5 Q