3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { protected $var; function initClass() { $this->var = __CLASS__; } function getVar() { assert($this->var !== null); // ensure initClass was called return $this->var; } } class bar extends foo { function initClass() { $this->var = __CLASS__; } } class baz extends bar { function initClass() { $this->var = __CLASS__; } } $baz = new baz; call_user_func([$baz, "foo::initClass"]); var_dump($baz->getVar());

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.0060.00918.68
8.3.50.0140.00316.62
8.3.40.0070.01018.67
8.3.30.0100.00318.91
8.3.20.0040.00420.38
8.3.10.0080.00021.90
8.3.00.0050.00517.50
8.2.180.0120.00316.75
8.2.170.0120.00322.96
8.2.160.0100.00720.21
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00019.48
8.2.110.0090.00022.20
8.2.100.0040.00817.91
8.2.90.0040.00419.05
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0050.00317.80
8.2.50.0060.00318.07
8.2.40.0050.00318.16
8.2.30.0040.00417.96
8.2.20.0040.00417.73
8.2.10.0040.00418.13
8.2.00.0040.00418.22
8.1.280.0100.00725.92
8.1.270.0080.00020.32
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00623.73
8.1.230.0040.00721.01
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0070.00317.23
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0000.00820.39
8.1.160.0040.00421.93
8.1.150.0030.00318.94
8.1.140.0000.00717.45
8.1.130.0060.00317.87
8.1.120.0000.00717.50
8.1.110.0070.00017.35
8.1.100.0030.00317.32
8.1.90.0000.00717.41
8.1.80.0000.00817.37
8.1.70.0040.00417.45
8.1.60.0030.00617.51
8.1.50.0040.00717.40
8.1.40.0030.00517.46
8.1.30.0000.00917.50
8.1.20.0050.00217.61
8.1.10.0040.00417.53
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0040.00416.61
8.0.280.0070.00018.46
8.0.270.0050.00317.26
8.0.260.0000.00617.13
8.0.250.0030.00316.95
8.0.240.0030.00616.92
8.0.230.0000.00716.94
8.0.220.0000.00716.94
8.0.210.0000.00716.90
8.0.200.0070.00016.82
8.0.190.0050.00616.93
8.0.180.0080.00016.82
8.0.170.0040.00416.89
8.0.160.0000.00716.93
8.0.150.0030.00316.87
8.0.140.0070.00016.93
8.0.130.0030.00313.32
8.0.120.0040.00416.90
8.0.110.0000.00716.95
8.0.100.0000.00816.83
8.0.90.0000.00717.00
8.0.80.0030.01316.95
8.0.70.0030.00516.82
8.0.60.0040.00416.83
8.0.50.0050.00216.88
8.0.30.0120.01017.05
8.0.20.0100.01017.40
8.0.10.0060.00316.93
8.0.00.0090.00816.75
7.4.330.0050.00015.03
7.4.320.0030.00316.57
7.4.300.0000.00716.42
7.4.290.0000.00716.63
7.4.280.0080.00016.61
7.4.270.0070.00016.63
7.4.260.0040.00416.38
7.4.250.0070.00016.55
7.4.240.0040.00316.51
7.4.230.0020.00516.63
7.4.220.0190.00016.70
7.4.210.0030.01616.54
7.4.200.0000.00716.69
7.4.160.0130.00316.41
7.4.150.0070.01117.40
7.4.140.0100.01317.86
7.4.130.0100.01116.52
7.4.120.0080.01016.63
7.4.110.0140.00316.54
7.4.100.0090.01416.47
7.4.90.0100.00716.63
7.4.80.0110.00719.39
7.4.70.0130.00616.49
7.4.60.0130.00316.39
7.4.50.0020.00216.36
7.4.40.0070.01016.54
7.4.30.0150.00816.41
7.4.00.0090.00814.90
7.3.330.0040.00313.15
7.3.320.0080.00413.21
7.3.310.0030.00516.41
7.3.300.0070.00016.38
7.3.290.0060.00916.36
7.3.280.0100.00716.38
7.3.270.0090.00917.40
7.3.260.0120.01216.67
7.3.250.0070.01216.39
7.3.240.0140.00416.36
7.3.230.0090.00916.39
7.3.210.0070.01016.62
7.3.200.0060.01519.39
7.3.190.0110.00516.65
7.3.180.0100.01016.53
7.3.170.0120.00916.46
7.3.160.0130.00316.43
7.3.120.0100.01014.91
7.3.110.0150.00315.02
7.3.100.0000.01314.71
7.3.90.0110.00714.87
7.3.80.0100.00714.96
7.3.70.0060.00314.69
7.3.60.0030.00614.95
7.3.50.0040.01115.02
7.3.40.0060.00914.74
7.3.30.0030.01014.79
7.3.20.0070.01116.29
7.3.10.0110.00716.27
7.3.00.0030.00716.41
7.2.330.0130.00716.54
7.2.320.0110.00716.45
7.2.310.0030.01316.77
7.2.300.0100.01016.63
7.2.290.0070.01016.73
7.2.250.0030.01015.06
7.2.240.0070.01015.00
7.2.230.0030.01515.02
7.2.220.0040.00815.18
7.2.210.0070.01014.82
7.2.200.0040.01114.88
7.2.190.0040.00714.98
7.2.180.0040.00815.10
7.2.170.0080.00414.93
7.1.330.0100.00315.71
7.1.320.0000.01215.84
7.1.310.0070.00415.75
7.1.300.0100.00315.86
7.1.290.0000.01315.39
7.1.280.0030.00615.92
7.1.270.0080.00415.91
7.1.260.0040.00715.85
7.1.100.0040.00817.85
7.1.70.0000.00817.13
7.1.60.0080.00519.50
7.1.50.0150.00916.60
7.1.00.0030.07322.46
7.0.200.0610.00314.70
7.0.110.0130.08319.94
7.0.100.0170.07319.93
7.0.90.0170.07719.93
7.0.80.0130.06019.99
7.0.70.0170.07319.92
7.0.60.0130.08019.91
7.0.50.0070.08019.95
7.0.40.0030.06719.70
7.0.30.0130.04019.66
7.0.20.0100.07019.73
7.0.10.0170.05019.78
7.0.00.0100.07719.75
5.6.280.0070.07020.77
5.6.260.0030.06020.69
5.6.250.0130.04020.51
5.6.240.0130.04320.71
5.6.230.0130.07320.70
5.6.220.0070.05320.66
5.6.210.0130.07020.56
5.6.200.0070.08320.57
5.6.190.0070.09320.66
5.6.180.0200.06320.69
5.6.170.0070.06720.61
5.6.160.0200.03720.61
5.6.150.0100.08020.66
5.6.140.0070.04020.62
5.6.130.0130.04720.56
5.6.120.0130.06320.62
5.6.110.0030.09020.57
5.6.100.0070.08020.55
5.6.90.0030.04020.57
5.6.80.0130.07020.07
5.6.70.0070.08320.06
5.6.60.0070.05319.93
5.6.50.0170.06720.06
5.6.40.0100.06319.95
5.6.30.0070.08019.98
5.6.20.0030.07320.05
5.6.10.0070.08320.05
5.6.00.0070.08019.91
5.5.380.0100.07017.52
5.5.370.0100.07317.47
5.5.360.0170.04717.56
5.5.350.0100.07317.64
5.5.340.0100.07718.23
5.5.330.0130.07318.25
5.5.320.0070.07717.93
5.5.310.0130.07318.09
5.5.300.0130.05318.13
5.5.290.0200.07018.05
5.5.280.0030.07718.22
5.5.270.0030.07718.11
5.5.260.0070.06718.22
5.5.250.0070.07317.65
5.5.240.0030.08017.48
5.5.230.0030.08017.63
5.5.220.0130.07317.47
5.5.210.0000.07717.29
5.5.200.0100.07317.45
5.5.190.0070.07317.43
5.5.180.0130.05017.58
5.5.160.0030.07717.27
5.5.150.0130.05717.28
5.5.140.0070.04017.18
5.5.130.0100.08317.48
5.5.120.0070.03317.28
5.5.110.0030.03717.29
5.5.100.0030.07017.48
5.5.90.0030.06317.16
5.5.80.0000.08017.08
5.5.70.0030.07317.38
5.5.60.0070.05717.34
5.5.50.0100.07017.36
5.5.40.0000.04717.46
5.5.30.0030.08317.29
5.5.20.0070.07717.46
5.5.10.0130.07017.47
5.5.00.0170.06717.30
5.4.450.0030.05019.64
5.4.440.0200.06719.57
5.4.430.0130.06719.30
5.4.420.0030.08019.41
5.4.410.0100.06719.44
5.4.400.0000.08019.25
5.4.390.0030.08019.03
5.4.380.0100.06319.03
5.4.370.0000.08319.24
5.4.360.0070.07719.04
5.4.350.0100.07318.95
5.4.340.0100.07319.03
5.4.320.0100.07019.34
5.4.310.0000.04319.01
5.4.300.0170.06719.01
5.4.290.0030.06019.06
5.4.280.0030.07719.02
5.4.270.0130.07018.96
5.4.260.0030.07319.14
5.4.250.0030.07319.02
5.4.240.0070.06019.23
5.4.230.0130.07019.15
5.4.220.0030.07719.22
5.4.210.0070.04019.22
5.4.200.0100.07319.16
5.4.190.0070.07018.94
5.4.180.0030.05319.02
5.4.170.0130.03719.19
5.4.160.0170.05718.99
5.4.150.0030.08319.16
5.4.140.0030.08016.35
5.4.130.0100.06716.52
5.4.120.0070.06316.38
5.4.110.0070.07316.50
5.4.100.0070.04016.62
5.4.90.0070.06716.48
5.4.80.0000.07316.46
5.4.70.0100.07316.61
5.4.60.0130.07016.56
5.4.50.0100.06716.53
5.4.40.0070.07016.50
5.4.30.0100.07316.62
5.4.20.0100.07316.28
5.4.10.0070.07016.48
5.4.00.0100.06315.98
5.3.290.0030.06314.76
5.3.280.0070.07714.62
5.3.270.0070.07714.63
5.3.260.0030.04314.74
5.3.250.0070.06014.63
5.3.240.0070.06714.47
5.3.230.0100.07014.71
5.3.220.0070.07014.53
5.3.210.0030.07714.71
5.3.200.0000.07014.71
5.3.190.0130.06314.57
5.3.180.0070.07714.57
5.3.170.0170.06714.71
5.3.160.0030.07014.57
5.3.150.0070.06714.43
5.3.140.0100.07314.52
5.3.130.0070.07314.54
5.3.120.0130.07314.57
5.3.110.0070.05714.66
5.3.100.0070.08014.28
5.3.90.0100.06314.12
5.3.80.0030.07714.04
5.3.70.0070.04714.26
5.3.60.0100.06314.10
5.3.50.0030.07714.09
5.3.40.0170.06313.80
5.3.30.0030.07713.89
5.3.20.0100.06013.68
5.3.10.0030.07013.74
5.3.00.0030.06313.67
5.2.170.0030.06312.13
5.2.160.0030.06012.13
5.2.150.0000.04312.13
5.2.140.0070.06012.13
5.2.130.0000.06312.13
5.2.120.0070.05712.13
5.2.110.0100.05712.13
5.2.100.0070.05712.13
5.2.90.0100.04712.13
5.2.80.0030.04312.13
5.2.70.0070.06012.13
5.2.60.0100.05012.13
5.2.50.0100.04312.13
5.2.40.0070.05012.13
5.2.30.0070.05712.13
5.2.20.0030.06012.13
5.2.10.0070.06012.13
5.2.00.0030.05712.13
5.1.60.0100.05012.13
5.1.50.0100.04712.13
5.1.40.0000.05012.13
5.1.30.0030.05712.13
5.1.20.0000.05712.13
5.1.10.0000.05712.13
5.1.00.0100.05012.13
5.0.50.0130.03712.13
5.0.40.0000.02312.13
5.0.30.0070.06312.13
5.0.20.0030.04312.13
5.0.10.0000.02012.13
5.0.00.0030.04312.13
4.4.90.0000.03712.13
4.4.80.0130.02312.13
4.4.70.0030.03312.13
4.4.60.0030.03312.13
4.4.50.0000.03712.13
4.4.40.0030.04312.13
4.4.30.0030.03312.13
4.4.20.0030.02012.13
4.4.10.0000.03712.13
4.4.00.0030.03712.13
4.3.110.0000.03012.13
4.3.100.0030.03012.13
4.3.90.0070.02712.13
4.3.80.0070.02712.13
4.3.70.0030.03012.13
4.3.60.0030.03312.13
4.3.50.0000.02712.13
4.3.40.0000.03312.13
4.3.30.0000.01312.13
4.3.20.0000.02312.13
4.3.10.0030.01312.13
4.3.00.0030.02312.13

preferences:
53.86 ms | 400 KiB | 5 Q