3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function __construct() { $this->something(); } public function something() { echo __CLASS__ . PHP_EOL; // foo } } class foo_bar extends foo { public function __construct() { parent::something(); $this->something(); } public function something() { echo __CLASS__ . PHP_EOL; // foo_bar } } class foo_bar_baz extends foo_bar { public function __construct() { foo::something(); parent::something(); $this->something(); } public function something() { echo __CLASS__ . PHP_EOL; // foo_bar_baz } public function call() { echo self::something(); // self echo parent::something(); // parent echo foo::something(); // grandparent } } $obj = new foo_bar_baz();

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.0070.01016.50
8.3.50.0100.00917.51
8.3.40.0040.01118.71
8.3.30.0090.00618.47
8.3.20.0000.00818.65
8.3.10.0030.00518.63
8.3.00.0080.00019.38
8.2.180.0070.01118.66
8.2.170.0100.01022.96
8.2.160.0130.00320.84
8.2.150.0070.00025.66
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0000.00819.77
8.2.110.0050.00521.04
8.2.100.0110.00017.78
8.2.90.0050.00519.47
8.2.80.0000.00919.47
8.2.70.0000.00817.63
8.2.60.0000.00817.80
8.2.50.0030.00518.07
8.2.40.0000.00818.34
8.2.30.0070.00017.96
8.2.20.0040.00417.61
8.2.10.0000.00817.59
8.2.00.0000.01017.64
8.1.280.0100.01025.92
8.1.270.0150.00324.66
8.1.260.0110.00826.35
8.1.250.0030.00528.09
8.1.240.0060.00322.42
8.1.230.0040.00720.97
8.1.220.0000.00817.74
8.1.210.0050.00318.84
8.1.200.0080.00317.22
8.1.190.0040.00417.39
8.1.180.0040.00418.10
8.1.170.0050.00318.95
8.1.160.0000.00718.75
8.1.150.0070.00018.59
8.1.140.0000.00717.37
8.1.130.0030.00317.78
8.1.120.0070.00017.46
8.1.110.0030.00517.29
8.1.100.0000.00717.31
8.1.90.0000.00817.43
8.1.80.0040.00417.41
8.1.70.0030.00617.31
8.1.60.0020.00517.50
8.1.50.0070.00017.48
8.1.40.0000.00917.57
8.1.30.0030.00617.59
8.1.20.0040.00417.68
8.1.10.0000.00717.55
8.1.00.0040.00417.56
8.0.300.0040.00419.89
8.0.290.0000.00716.63
8.0.280.0030.00318.45
8.0.270.0040.00417.28
8.0.260.0000.00716.71
8.0.250.0000.00716.92
8.0.240.0000.00716.82
8.0.230.0040.00416.91
8.0.220.0000.00716.83
8.0.210.0000.00716.81
8.0.200.0000.00716.91
8.0.190.0070.00016.91
8.0.180.0030.00316.89
8.0.170.0050.00516.67
8.0.160.0040.00416.93
8.0.150.0000.00816.78
8.0.140.0040.00416.73
8.0.130.0030.00313.34
8.0.120.0000.00716.80
8.0.110.0040.00416.76
8.0.100.0070.00016.64
8.0.90.0000.00716.71
8.0.80.0100.00616.91
8.0.70.0000.00816.88
8.0.60.0050.00216.84
8.0.50.0080.00016.86
8.0.30.0110.00717.16
8.0.20.0060.01317.28
8.0.10.0070.00016.90
8.0.00.0080.01516.59
7.4.330.0050.00012.87
7.4.320.0070.00016.58
7.4.300.0000.00616.63
7.4.290.0030.00316.67
7.4.280.0040.00416.51
7.4.270.0030.00316.43
7.4.260.0000.00513.28
7.4.250.0000.00816.55
7.4.240.0040.00316.59
7.4.230.0000.00716.56
7.4.220.0160.00916.65
7.4.210.0080.00916.69
7.4.200.0030.00316.43
7.4.190.0000.00716.47
7.4.160.0110.00616.47
7.4.150.0120.01316.39
7.4.140.0160.00516.57
7.4.130.0090.00816.39
7.4.120.0080.00816.59
7.4.110.0090.00916.60
7.4.100.0070.01016.63
7.4.90.0110.01216.63
7.4.80.0090.00819.39
7.4.70.0000.01516.44
7.4.60.0040.01416.18
7.4.50.0120.00016.17
7.4.40.0130.00316.53
7.4.30.0110.00916.45
7.4.10.0100.00714.96
7.4.00.0100.00715.04
7.3.330.0070.00013.04
7.3.320.0030.00513.19
7.3.310.0000.00716.23
7.3.300.0030.00316.16
7.3.290.0100.00616.26
7.3.280.0060.00816.21
7.3.270.0100.00716.45
7.3.260.0060.01516.24
7.3.250.0110.01316.50
7.3.240.0120.00316.25
7.3.230.0070.01016.21
7.3.210.0030.01316.41
7.3.200.0100.00616.18
7.3.190.0100.01016.24
7.3.180.0090.00616.17
7.3.170.0090.00616.33
7.3.160.0000.01516.12
7.3.130.0140.00414.74
7.3.120.0020.01514.75
7.3.110.0060.00914.82
7.3.100.0060.00615.03
7.3.90.0030.01014.56
7.3.80.0030.00914.92
7.3.70.0040.01214.86
7.3.60.0070.00714.74
7.3.50.0030.00814.50
7.3.40.0000.01214.72
7.3.30.0040.00814.61
7.3.20.0060.00316.63
7.3.10.0090.00616.56
7.3.00.0070.00716.75
7.2.330.0040.01516.80
7.2.320.0140.01016.30
7.2.310.0120.00616.64
7.2.300.0100.00716.54
7.2.290.0140.00716.39
7.2.260.0130.00615.04
7.2.250.0110.00714.64
7.2.240.0090.00615.26
7.2.230.0070.01014.94
7.2.220.0140.00014.84
7.2.210.0070.00714.68
7.2.200.0060.00614.68
7.2.190.0100.00314.80
7.2.180.0040.00814.97
7.2.170.0080.00615.00
7.2.160.0060.00914.98
7.2.150.0040.00717.04
7.2.140.0100.00716.87
7.2.130.0030.00717.07
7.2.120.0030.01016.69
7.2.110.0080.00616.91
7.2.100.0100.00016.95
7.2.90.0110.00016.68
7.2.80.0040.01116.71
7.2.70.0000.00917.02
7.2.60.0070.00516.96
7.2.50.0090.00616.70
7.2.40.0090.00416.91
7.2.30.0040.01116.82
7.2.20.0030.00917.08
7.2.10.0100.00616.87
7.2.00.0070.00518.07
7.1.330.0090.00315.37
7.1.320.0090.00915.73
7.1.310.0040.01115.40
7.1.300.0090.00315.61
7.1.290.0100.00715.61
7.1.280.0000.01415.55
7.1.270.0030.00615.54
7.1.260.0040.01115.55
7.1.250.0000.00815.74
7.1.240.0060.00315.54
7.1.230.0040.01115.75
7.1.220.0040.01115.45
7.1.210.0070.00315.65
7.1.200.0080.00515.51
7.1.190.0060.00315.53
7.1.180.0000.01515.53
7.1.170.0060.00915.57
7.1.160.0120.00015.58
7.1.150.0070.00715.61
7.1.140.0030.00615.64
7.1.130.0030.00915.42
7.1.120.0070.00715.83
7.1.110.0030.01015.62
7.1.100.0070.00516.67
7.1.90.0000.01015.76
7.1.80.0030.01015.70
7.1.70.0070.00416.25
7.1.60.0060.00916.47
7.1.50.0060.00916.29
7.1.40.0060.00615.82
7.1.30.0040.01115.45
7.1.20.0000.00915.61
7.1.10.0060.00315.59
7.1.00.0090.04019.00
7.0.330.0130.00015.52
7.0.320.0040.01115.28
7.0.310.0100.00315.36
7.0.300.0070.00314.98
7.0.290.0070.00715.09
7.0.280.0030.00615.27
7.0.270.0030.01215.38
7.0.260.0100.00315.32
7.0.250.0030.00615.51
7.0.240.0060.00615.14
7.0.230.0000.01515.48
7.0.220.0080.00815.24
7.0.210.0030.00615.16
7.0.200.0060.00816.00
7.0.190.0030.01015.39
7.0.180.0070.00715.29
7.0.170.0000.01315.13
7.0.160.0090.00314.98
7.0.150.0090.00315.49
7.0.140.0030.04318.61
7.0.130.0030.00515.15
7.0.120.0080.03318.58
7.0.110.0040.00715.29
7.0.100.0090.00615.22
7.0.90.0100.00315.44
7.0.80.0060.00615.31
7.0.70.0090.00915.50
7.0.60.0150.03917.63
7.0.50.0020.03016.53
7.0.40.0160.03516.73
7.0.30.0170.04216.76
7.0.20.0180.03516.64
7.0.10.0030.03516.88
7.0.00.0070.03316.84
5.6.400.0070.01014.61
5.6.390.0100.00314.46
5.6.380.0040.00714.56
5.6.370.0110.00314.64
5.6.360.0100.00313.91
5.6.350.0060.00314.54
5.6.340.0110.00414.60
5.6.330.0030.01214.34
5.6.320.0030.00714.35
5.6.310.0120.00014.10
5.6.300.0030.01214.50
5.6.290.0000.01314.45
5.6.280.0050.04217.74
5.6.270.0030.01014.27
5.6.260.0090.00614.43
5.6.250.0060.00614.11
5.6.240.0060.00614.28
5.6.230.0070.00714.36
5.6.220.0040.00714.26
5.6.210.0060.02517.56
5.6.200.0020.03716.24
5.6.190.0030.04617.40
5.6.180.0180.02817.39
5.6.170.0100.03317.30
5.6.160.0020.02716.36
5.6.150.0100.03716.23
5.6.140.0050.02516.20
5.6.130.0040.04916.30
5.6.120.0080.02317.81
5.6.110.0030.02817.71
5.6.100.0050.04917.66
5.6.90.0040.02717.62
5.6.80.0070.03317.33
5.6.70.0100.00014.09
5.6.60.0060.00914.29
5.6.50.0060.00914.31
5.6.40.0030.01014.13
5.6.30.0110.00314.35
5.6.20.0130.00314.10
5.6.10.0070.00714.18
5.6.00.0100.00314.24
5.5.380.0070.00313.92
5.5.370.0030.01014.27
5.5.360.0080.00314.15
5.5.350.0170.03717.17
5.5.340.0050.02416.09
5.5.330.0080.03817.37
5.5.320.0130.02117.25
5.5.310.0180.03717.27
5.5.300.0080.04216.02
5.5.290.0050.02316.17
5.5.280.0030.03817.55
5.5.270.0050.05017.57
5.5.260.0070.03917.65
5.5.250.0130.03717.42
5.5.240.0130.04117.20
5.5.230.0100.00314.08
5.5.220.0080.00413.96
5.5.210.0060.00313.90
5.5.200.0030.01014.03
5.5.190.0120.00314.24
5.5.180.0120.00313.73
5.5.170.0060.00914.11
5.5.160.0060.01014.10
5.5.150.0090.00614.09
5.5.140.0070.00714.27
5.5.130.0060.01213.85
5.5.120.0110.00414.21
5.5.110.0080.01214.18
5.5.100.0060.00314.21
5.5.90.0040.01414.22
5.5.80.0070.00714.36
5.5.70.0040.01113.78
5.5.60.0090.00614.33
5.5.50.0030.01313.88
5.5.40.0060.00614.24
5.5.30.0060.01214.26
5.5.20.0070.00414.40
5.5.10.0080.00414.23
5.5.00.0000.01513.99
5.4.450.0030.03415.34
5.4.440.0030.03015.34
5.4.430.0080.02615.25
5.4.420.0050.02215.15
5.4.410.0030.04215.20
5.4.400.0070.02714.90
5.4.390.0070.02315.18
5.4.380.0000.04215.12
5.4.370.0080.03215.08
5.4.360.0030.03615.01
5.4.350.0040.02414.93
5.4.340.0050.04014.87
5.4.330.0080.00610.98
5.4.320.0020.04914.87
5.4.310.0040.03114.85
5.4.300.0040.03314.97
5.4.290.0020.04315.08
5.4.280.0100.04014.90
5.4.270.0050.04114.88
5.4.260.0040.04015.02
5.4.250.0020.02814.88
5.4.240.0080.03614.80
5.4.230.0040.03114.90
5.4.220.0030.04114.76
5.4.210.0030.02814.87
5.4.200.0060.03615.05
5.4.190.0050.02615.07
5.4.180.0110.02015.21
5.4.170.0080.03015.09
5.4.160.0040.04014.93
5.4.150.0040.03514.91
5.4.140.0020.04113.78
5.4.130.0120.03513.70
5.4.120.0030.04613.75
5.4.110.0030.04213.67
5.4.100.0050.02613.87
5.4.90.0030.04213.87
5.4.80.0030.04213.65
5.4.70.0030.04313.79
5.4.60.0080.03513.53
5.4.50.0050.02213.71
5.4.40.0050.02213.69
5.4.30.0070.03113.64
5.4.20.0030.04113.70
5.4.10.0030.03813.51
5.4.00.0050.03613.35
5.3.290.0050.03912.82
5.3.280.0020.02312.65
5.3.270.0050.04112.63
5.3.260.0050.03612.68
5.3.250.0060.03512.63
5.3.240.0030.03212.58
5.3.230.0060.04312.60
5.3.220.0060.03312.51
5.3.210.0060.04212.53
5.3.200.0020.03312.53
5.3.190.0070.04212.59
5.3.180.0040.03912.62
5.3.170.0100.02012.61
5.3.160.0050.04012.71
5.3.150.0000.03412.54
5.3.140.0030.02212.52
5.3.130.0020.03312.66
5.3.120.0080.03812.55
5.3.110.0080.04212.51
5.3.100.0070.03212.36
5.3.90.0000.03412.25
5.3.80.0030.03312.28
5.3.70.0050.04012.31
5.3.60.0050.02512.22
5.3.50.0100.03412.21
5.3.40.0060.03112.25
5.3.30.0050.03812.27
5.3.20.0020.03412.19
5.3.10.0020.02212.04
5.3.00.0050.03712.04
5.2.170.0070.06011.19
5.2.160.0100.05011.30
5.2.150.0070.05711.07
5.2.140.0100.06011.04
5.2.130.0070.03311.14
5.2.120.0030.03011.27
5.2.110.0030.06311.11
5.2.100.0030.04711.07
5.2.90.0000.04011.14
5.2.80.0000.03311.08
5.2.70.0000.03011.11
5.2.60.0000.03011.05
5.2.50.0030.03311.04
5.2.40.0000.03011.06
5.2.30.0030.02711.04
5.2.20.0030.03311.03
5.2.10.0000.03010.87
5.2.00.0000.03010.73
5.1.60.0000.0239.97
5.1.50.0030.02310.00
5.1.40.0070.02010.01
5.1.30.0000.02710.49
5.1.20.0030.02310.28
5.1.10.0000.02710.07
5.1.00.0030.04710.12
5.0.50.0030.0208.46
5.0.40.0030.0178.39
5.0.30.0030.0278.25
5.0.20.0000.0208.27
5.0.10.0030.0208.33
5.0.00.0000.0308.13
4.4.90.0000.0177.69
4.4.80.0030.0137.69
4.4.70.0000.0177.69
4.4.60.0000.0177.69
4.4.50.0070.0107.69
4.4.40.0000.0237.69
4.4.30.0000.0177.69
4.4.20.0070.0137.69
4.4.10.0030.0137.69
4.4.00.0030.0207.69
4.3.110.0000.0137.69
4.3.100.0000.0177.69
4.3.90.0030.0107.69
4.3.80.0000.0237.69
4.3.70.0000.0137.69
4.3.60.0000.0137.69
4.3.50.0070.0107.69
4.3.40.0000.0237.69
4.3.30.0030.0107.69
4.3.20.0000.0177.69
4.3.10.0000.0137.69
4.3.00.0000.0137.69

preferences:
56.52 ms | 401 KiB | 5 Q