3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Aparent { protected $is_something; public function __construct() { $this->is_something = FALSE; $this->thing(); } public function thing() { if ($this->is_something) { print "Aparent.thing() reports is_something as TRUE\n"; } else { print "Aparent.thing() reports is_something as FALSE\n"; } } } class Achild extends Aparent { public function thing() { print "Achild before changing is_something\n"; if ($this->is_something) { print "Achild.thing() reports is_something as TRUE\n"; } else { print "Achild.thing() reports is_something as FALSE\n"; } $this->is_something = TRUE; print "Achild after changing is_something\n"; if ($this->is_something) { print "Achild.thing() reports is_something as TRUE\n"; } else { print "Achild.thing() reports is_something as FALSE\n"; } print "Achild calling parent::thing()\n"; parent::thing(); } } $o = new Achild();

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.70.0140.00716.75
8.3.60.0160.00316.50
8.3.50.0070.01222.91
8.3.40.0090.00618.63
8.3.30.0140.00719.07
8.3.20.0040.00420.35
8.3.10.0040.00423.61
8.3.00.0040.00417.25
8.2.180.0100.00616.73
8.2.170.0070.00722.96
8.2.160.0070.00720.57
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00726.16
8.2.120.0040.00421.22
8.2.110.0030.00622.15
8.2.100.0110.00017.84
8.2.90.0050.00219.22
8.2.80.0030.00617.97
8.2.70.0030.00617.63
8.2.60.0000.00917.93
8.2.50.0030.00518.07
8.2.40.0060.00318.22
8.2.30.0000.00717.87
8.2.20.0070.00017.62
8.2.10.0070.00017.91
8.2.00.0000.00817.62
8.1.280.0110.00425.92
8.1.270.0000.00722.04
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0080.00023.83
8.1.230.0120.00019.14
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0070.00317.23
8.1.190.0050.00317.23
8.1.180.0070.00018.10
8.1.170.0040.00418.37
8.1.160.0000.00821.96
8.1.150.0040.00418.78
8.1.140.0040.00417.34
8.1.130.0050.00317.95
8.1.120.0000.00817.43
8.1.110.0000.00817.38
8.1.100.0000.00717.41
8.1.90.0030.00317.29
8.1.80.0030.00317.39
8.1.70.0030.00317.33
8.1.60.0050.00317.43
8.1.50.0060.00317.40
8.1.40.0030.00617.39
8.1.30.0080.00017.61
8.1.20.0040.00717.57
8.1.10.0040.00417.56
8.1.00.0040.00417.48
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00818.38
8.0.270.0040.00417.30
8.0.260.0000.00617.22
8.0.250.0070.00016.90
8.0.240.0070.00016.87
8.0.230.0050.00316.76
8.0.220.0000.00616.78
8.0.210.0000.00716.83
8.0.200.0030.00316.94
8.0.190.0000.00716.76
8.0.180.0000.00716.84
8.0.170.0040.00416.86
8.0.160.0040.00416.89
8.0.150.0000.00716.79
8.0.140.0070.00016.71
8.0.130.0060.00313.22
8.0.120.0050.00216.88
8.0.110.0050.00216.77
8.0.100.0050.00216.70
8.0.90.0040.00416.89
8.0.80.0140.00416.79
8.0.70.0070.00016.85
8.0.60.0000.00716.90
8.0.50.0000.00716.73
8.0.30.0110.01016.75
8.0.20.0100.01217.40
8.0.10.0000.00716.98
8.0.00.0140.00816.56
7.4.330.0040.00415.00
7.4.320.0060.00016.55
7.4.300.0040.00416.59
7.4.290.0000.00716.59
7.4.280.0030.00616.62
7.4.270.0000.00816.61
7.4.260.0040.00816.46
7.4.250.0020.00516.48
7.4.240.0000.00716.51
7.4.230.0030.00316.68
7.4.220.0060.01216.55
7.4.210.0140.00016.55
7.4.200.0000.00716.48
7.4.160.0090.01516.30
7.4.150.0210.00717.40
7.4.140.0110.00917.86
7.4.130.0110.01016.48
7.4.120.0080.00916.47
7.4.110.0160.00316.64
7.4.100.0120.00616.42
7.4.90.0110.00616.39
7.4.80.0110.01119.39
7.4.70.0090.00816.73
7.4.60.0130.00316.56
7.4.50.0030.00616.52
7.4.40.0100.00616.61
7.4.30.0130.00716.55
7.4.00.0100.00714.86
7.3.330.0030.00313.30
7.3.320.0000.00613.38
7.3.310.0070.00016.30
7.3.300.0000.00916.16
7.3.290.0000.01416.32
7.3.280.0090.00916.29
7.3.270.0100.00617.40
7.3.260.0060.01216.35
7.3.250.0110.00716.56
7.3.240.0070.01016.23
7.3.230.0080.00816.58
7.3.210.0070.01716.63
7.3.200.0070.00919.39
7.3.190.0030.01316.49
7.3.180.0070.01316.50
7.3.170.0090.00616.33
7.3.160.0120.00916.32
7.3.120.0050.01214.79
7.3.110.0060.00914.86
7.3.100.0090.00614.83
7.3.90.0070.00714.85
7.3.80.0080.00514.83
7.3.70.0090.00514.71
7.3.60.0060.00714.76
7.3.50.0060.00714.63
7.3.40.0050.01014.76
7.3.30.0050.00614.77
7.3.20.0070.00716.48
7.3.10.0060.00816.52
7.3.00.0090.00516.61
7.2.330.0030.01516.61
7.2.320.0140.00716.43
7.2.310.0090.00616.74
7.2.300.0070.01516.48
7.2.290.0090.01216.69
7.2.250.0070.01114.96
7.2.240.0070.01215.10
7.2.230.0040.01215.17
7.2.220.0090.00514.96
7.2.210.0030.01215.24
7.2.200.0130.00114.99
7.2.190.0080.00614.95
7.2.180.0070.00414.92
7.2.170.0040.00714.91
7.2.160.0030.00714.82
7.2.150.0080.00416.88
7.2.140.0060.00316.97
7.2.130.0040.00817.09
7.2.120.0000.01116.91
7.2.110.0030.01017.11
7.2.100.0100.00716.87
7.2.90.0060.00917.17
7.2.80.0060.00916.93
7.2.70.0040.01416.94
7.2.60.0030.00816.81
7.2.50.0040.00816.78
7.2.40.0040.01216.97
7.2.30.0070.00416.92
7.2.20.0070.00717.01
7.2.10.0070.00716.88
7.2.00.0050.00518.16
7.1.330.0070.00815.70
7.1.320.0070.00615.78
7.1.310.0050.00915.91
7.1.300.0030.01115.69
7.1.290.0030.01015.71
7.1.280.0110.00315.65
7.1.270.0020.01015.71
7.1.260.0040.00915.50
7.1.250.0000.00915.76
7.1.200.0070.00715.77
7.1.100.0040.00817.76
7.1.70.0000.01017.17
7.1.60.0120.01219.40
7.1.50.0130.00916.57
7.1.00.0070.07322.48
7.0.200.0000.00716.82
7.0.140.0070.06722.11
7.0.60.0030.04020.04
7.0.50.0070.04317.73
7.0.40.0000.05020.21
7.0.30.0300.08320.23
7.0.20.0170.07320.27
7.0.10.0100.07020.20
7.0.00.0070.08020.20
5.6.280.0100.06321.13
5.6.210.0130.07720.61
5.6.200.0070.09018.24
5.6.190.0070.07320.63
5.6.180.0270.04720.68
5.6.170.0200.08320.47
5.6.160.0130.07720.71
5.6.150.0070.06718.14
5.6.140.0100.07018.28
5.6.130.0070.05718.15
5.6.120.0030.08721.00
5.6.110.0070.07020.98
5.6.100.0070.05321.11
5.6.90.0170.07021.11
5.6.80.0130.07020.36
5.5.350.0300.07320.35
5.5.340.0100.03718.04
5.5.330.0000.05020.21
5.5.320.0230.05720.27
5.5.310.0270.04720.28
5.5.300.0100.07717.95
5.5.290.0030.08318.01
5.5.280.0030.05720.88
5.5.270.0070.04720.90
5.5.260.0130.08020.96
5.5.250.0130.07020.70
5.5.240.0030.05020.29
5.4.450.0930.05719.34
5.4.440.0770.04319.66
5.4.430.0530.05719.48
5.4.420.0570.05319.53
5.4.410.0170.05018.86
5.4.400.0500.04718.89
5.4.390.0130.05318.77
5.4.380.0100.05018.54
5.4.370.0000.04318.50
5.4.360.0070.05318.76
5.4.350.0110.03312.02
5.4.340.0060.03512.02
5.4.320.0020.04012.50
5.4.310.0060.03912.50
5.4.300.0050.03712.50
5.4.290.0030.04012.50
5.4.280.0070.03512.40
5.4.270.0060.03612.39
5.4.260.0050.03812.40
5.4.250.0050.04112.40
5.4.240.0140.03012.39
5.4.230.0090.03512.39
5.4.220.0030.03912.39
5.4.210.0040.03912.39
5.4.200.0070.03712.39
5.4.190.0050.04212.39
5.4.180.0080.03512.38
5.4.170.0070.04012.40
5.4.160.0030.03912.39
5.4.150.0050.04012.39
5.4.140.0110.03912.07
5.4.130.0070.04112.06
5.4.120.0060.03712.02
5.4.110.0070.03512.02
5.4.100.0050.03612.02
5.4.90.0060.03612.02
5.4.80.0060.03612.01
5.4.70.0080.03412.01
5.4.60.0070.03312.02
5.4.50.0070.03512.02
5.4.40.0030.03912.00
5.4.30.0060.03511.99
5.4.20.0060.03712.00
5.4.10.0060.03912.00
5.4.00.0050.03711.48
5.3.290.0070.04512.80
5.3.280.0070.03812.70
5.3.270.0070.04312.72
5.3.260.0060.03912.72
5.3.250.0060.03712.72
5.3.240.0070.03712.72
5.3.230.0100.03412.71
5.3.220.0040.03912.68
5.3.210.0060.03812.68
5.3.200.0060.03712.68
5.3.190.0090.04012.68
5.3.180.0050.04012.67
5.3.170.0070.03512.66
5.3.160.0030.04512.68
5.3.150.0080.04912.67
5.3.140.0090.04712.66
5.3.130.0040.05412.66
5.3.120.0120.04212.66
5.3.110.0060.05012.66
5.3.100.0070.03712.13
5.3.90.0080.03412.11
5.3.80.0050.04912.10
5.3.70.0060.04112.10
5.3.60.0060.03612.08
5.3.50.0080.04212.03
5.3.40.0080.03612.03
5.3.30.0050.03611.99
5.3.20.0050.03611.77
5.3.10.0040.03511.73
5.3.00.0060.03611.73
5.2.170.0040.0319.22
5.2.160.0060.0289.22
5.2.150.0050.0309.23
5.2.140.0080.0289.22
5.2.130.0040.0329.18
5.2.120.0050.0289.18
5.2.110.0070.0309.19
5.2.100.0100.0269.18
5.2.90.0050.0379.18
5.2.80.0090.0269.18
5.2.70.0040.0319.18
5.2.60.0040.0319.14
5.2.50.0040.0319.11
5.2.40.0060.0359.09
5.2.30.0070.0299.05
5.2.20.0040.0359.04
5.2.10.0060.0288.95
5.2.00.0070.0288.81
5.1.60.0070.0218.09
5.1.50.0060.0238.09
5.1.40.0030.0338.07
5.1.30.0100.0238.42
5.1.20.0050.0288.44
5.1.10.0040.0278.17
5.1.00.0030.0278.17
5.0.50.0020.0226.65
5.0.40.0050.0226.51
5.0.30.0030.0376.32
5.0.20.0040.0196.28
5.0.10.0080.0206.27
5.0.00.0030.0316.26
4.4.90.0050.0144.78
4.4.80.0040.0144.75
4.4.70.0030.0164.75
4.4.60.0010.0184.76
4.4.50.0020.0174.77
4.4.40.0070.0224.71
4.4.30.0050.0154.76
4.4.20.0070.0204.84
4.4.10.0080.0264.85
4.4.00.0050.0304.76
4.3.110.0060.0194.66
4.3.100.0030.0184.67
4.3.90.0020.0154.63
4.3.80.0060.0224.59
4.3.70.0020.0174.63
4.3.60.0050.0124.63
4.3.50.0020.0184.63
4.3.40.0030.0274.54
4.3.30.0030.0153.30
4.3.20.0010.0173.28
4.3.10.0030.0163.23
4.3.00.0230.0237.21

preferences:
42.22 ms | 401 KiB | 5 Q