3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $a = 3; protected $b = 4; private $c = 5; } class B extends A { public $a = 9; public $b = 8; private $c = 7; function doIt() { return $this->a + $this->b + $this->c; } } $b = new B(); echo $b->doIt();

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.00718.55
8.3.50.0070.01016.29
8.3.40.0070.00718.71
8.3.30.0070.00718.71
8.3.20.0040.00419.97
8.3.10.0030.00721.58
8.3.00.0030.00619.59
8.2.180.0110.00716.74
8.2.170.0060.00822.96
8.2.160.0070.00719.08
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0040.00419.27
8.2.120.0040.00426.35
8.2.110.0060.00322.08
8.2.100.0040.00817.55
8.2.90.0000.00819.08
8.2.80.0080.00017.97
8.2.70.0000.00817.50
8.2.60.0030.00517.93
8.2.50.0050.00318.10
8.2.40.0050.00220.49
8.2.30.0040.00419.18
8.2.20.0000.00718.12
8.2.10.0040.00417.90
8.2.00.0030.00518.03
8.1.280.0060.01525.92
8.1.270.0000.00822.05
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0040.00722.12
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0000.00817.10
8.1.180.0060.00318.10
8.1.170.0000.00818.53
8.1.160.0040.00419.02
8.1.150.0020.00518.82
8.1.140.0000.00819.46
8.1.130.0050.00218.76
8.1.120.0000.00817.40
8.1.110.0060.00317.36
8.1.100.0040.00417.42
8.1.90.0030.00517.38
8.1.80.0030.00317.36
8.1.70.0000.00717.45
8.1.60.0080.00317.61
8.1.50.0000.00817.44
8.1.40.0000.00917.39
8.1.30.0040.00417.60
8.1.20.0000.00717.68
8.1.10.0040.00417.54
8.1.00.0040.00417.39
8.0.300.0050.00318.77
8.0.290.0080.00016.75
8.0.280.0040.00418.51
8.0.270.0030.00317.19
8.0.260.0030.00316.73
8.0.250.0030.00316.85
8.0.240.0000.00816.98
8.0.230.0000.00716.91
8.0.220.0060.00016.76
8.0.210.0000.00716.74
8.0.200.0060.00016.92
8.0.190.0060.00316.89
8.0.180.0040.00416.80
8.0.170.0040.00416.80
8.0.160.0000.00716.83
8.0.150.0030.00416.66
8.0.140.0040.00416.77
8.0.130.0000.00613.21
8.0.120.0020.00516.81
8.0.110.0070.00016.64
8.0.100.0050.00216.73
8.0.90.0050.00216.77
8.0.80.0110.00616.80
8.0.70.0040.00416.84
8.0.60.0030.00516.82
8.0.50.0040.00416.88
8.0.30.0070.00917.07
8.0.20.0120.00717.41
8.0.10.0000.00716.76
8.0.00.0100.00716.73
7.4.330.0020.00215.55
7.4.320.0000.00716.34
7.4.300.0050.00216.58
7.4.290.0000.00716.58
7.4.280.0070.00016.48
7.4.270.0000.00716.51
7.4.260.0000.00716.34
7.4.250.0040.00416.43
7.4.240.0080.00016.65
7.4.230.0030.00316.34
7.4.220.0130.01316.59
7.4.210.0070.01316.55
7.4.200.0040.00416.62
7.4.160.0080.00916.43
7.4.150.0080.01117.40
7.4.140.0100.00917.86
7.4.130.0140.01016.55
7.4.120.0120.01016.47
7.4.110.0030.01316.57
7.4.100.0090.01216.41
7.4.90.0140.00316.37
7.4.80.0100.01119.39
7.4.70.0110.00716.64
7.4.60.0060.00916.37
7.4.50.0130.00016.50
7.4.40.0060.01516.69
7.4.30.0040.01416.44
7.4.10.0030.01414.73
7.4.00.0080.00915.16
7.3.330.0000.00513.30
7.3.320.0050.00013.16
7.3.310.0000.00716.16
7.3.300.0030.00316.14
7.3.290.0110.00616.20
7.3.280.0100.00816.22
7.3.270.0070.01117.40
7.3.260.0110.00816.42
7.3.250.0140.00616.30
7.3.240.0100.01016.38
7.3.230.0160.00016.32
7.3.210.0110.00616.50
7.3.200.0030.01716.27
7.3.190.0030.01216.52
7.3.180.0030.01216.43
7.3.170.0090.00616.29
7.3.160.0100.00616.51
7.3.130.0070.01115.00
7.3.120.0080.01014.85
7.3.110.0130.00314.71
7.3.100.0030.00714.66
7.3.90.0020.00914.89
7.3.80.0010.01014.84
7.3.70.0020.00914.54
7.3.60.0020.01414.72
7.3.50.0100.00714.78
7.3.40.0080.00714.53
7.3.30.0050.00614.79
7.3.20.0090.00616.51
7.3.10.0020.01416.71
7.3.00.0030.01216.47
7.2.330.0090.00916.82
7.2.320.0100.00616.59
7.2.310.0100.00716.93
7.2.300.0130.00316.78
7.2.290.0080.01316.50
7.2.260.0030.01615.01
7.2.250.0070.01015.18
7.2.240.0090.00915.06
7.2.230.0020.01314.96
7.2.220.0100.00615.06
7.2.210.0030.01114.96
7.2.200.0070.00414.84
7.2.190.0070.00614.83
7.2.180.0050.01214.97
7.2.170.0050.00915.07
7.2.160.0070.00714.88
7.2.150.0090.00616.79
7.2.140.0030.01016.88
7.2.130.0040.01217.01
7.2.120.0040.01116.72
7.2.110.0060.00916.75
7.2.100.0070.01016.85
7.2.90.0000.01116.79
7.2.80.0100.00316.91
7.2.70.0070.00716.90
7.2.60.0060.00916.90
7.2.50.0110.00416.84
7.2.40.0090.00617.10
7.2.30.0120.00416.63
7.2.20.0050.00516.79
7.2.10.0040.00716.80
7.2.00.0080.00718.08
7.1.330.0050.00815.61
7.1.320.0040.00715.71
7.1.310.0030.01115.66
7.1.300.0090.00415.62
7.1.290.0030.01215.67
7.1.280.0050.00715.72
7.1.270.0060.01015.62
7.1.260.0050.00915.62
7.1.250.0110.00315.76
7.1.240.0090.00615.76
7.1.230.0070.01015.53
7.1.220.0060.01215.89
7.1.210.0100.00315.66
7.1.200.0030.01015.66
7.1.190.0110.00315.81
7.1.180.0040.00415.41
7.1.170.0030.01415.40
7.1.160.0070.00715.45
7.1.150.0060.00615.64
7.1.140.0030.00615.48
7.1.130.0120.00315.52
7.1.120.0040.00415.72
7.1.110.0030.00715.69
7.1.100.0050.00716.81
7.1.90.0040.00715.85
7.1.80.0000.01215.81
7.1.70.0060.00816.36
7.1.60.0110.01025.36
7.1.50.0170.00825.26
7.1.40.0140.00824.98
7.1.30.0130.01125.04
7.1.20.0130.01225.07
7.1.10.0040.01215.96
7.1.00.0050.01316.21
7.0.330.0030.01015.31
7.0.320.0070.01115.54
7.0.310.0070.00315.13
7.0.300.0070.01015.16
7.0.290.0030.00715.45
7.0.280.0030.00615.29
7.0.270.0030.01215.23
7.0.260.0030.01015.52
7.0.250.0070.00715.30
7.0.240.0040.01115.47
7.0.230.0090.00615.29
7.0.220.0030.01015.35
7.0.210.0030.01015.11
7.0.200.0020.01216.04
7.0.190.0070.00716.03
7.0.180.0070.00615.80
7.0.170.0040.01115.88
7.0.160.0050.01015.78
7.0.150.0030.01015.67
7.0.140.0030.01315.77
7.0.130.0070.01015.91
7.0.120.0060.01215.77
7.0.110.0050.00915.72
7.0.100.0060.01215.87
7.0.90.0020.01215.90
7.0.80.0050.00915.97
7.0.70.0050.01115.90
7.0.60.0030.01115.47
7.0.50.0040.01015.96
7.0.40.0100.00514.91
7.0.30.0060.00915.00
7.0.20.0060.00915.05
7.0.10.0090.00714.89
7.0.00.0100.00614.87
5.6.400.0040.00814.59
5.6.390.0100.00314.53
5.6.380.0070.01114.10
5.6.370.0060.00314.73
5.6.360.0060.00314.52
5.6.350.0030.01114.34
5.6.340.0120.00014.57
5.6.330.0090.00614.64
5.6.320.0150.00014.46
5.6.310.0080.00413.97
5.6.300.0070.00714.26
5.6.290.0090.00314.55
5.6.280.0080.00614.51
5.6.270.0000.00814.05
5.6.260.0030.00814.16
5.6.250.0080.00814.36
5.6.240.0060.00614.22
5.6.230.0080.00814.53
5.6.220.0040.00814.24
5.6.210.0040.01114.16
5.6.200.0060.00614.27
5.6.190.0030.00714.05
5.6.180.0070.00314.38
5.6.170.0110.00414.18
5.6.160.0040.00414.57
5.6.150.0030.01014.16
5.6.140.0030.00714.49
5.6.130.0000.01014.43
5.6.120.0030.00914.22
5.6.110.0090.00614.30
5.6.100.0040.01114.39
5.6.90.0030.01014.23
5.6.80.0000.01714.29
5.6.70.0030.00914.15
5.6.60.0090.00314.13
5.6.50.0060.01014.20
5.6.40.0030.01014.21
5.6.30.0000.01514.32
5.6.20.0120.00614.16
5.6.10.0070.01014.29
5.6.00.0070.00714.45

preferences:
47.95 ms | 401 KiB | 5 Q