3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MainClass{ public $var; function __construct(){ $this->var = "text"; } } class SecondClass{ public $var_2; function __construct(){ $this->var_2 = new MainClass(); } } class TheClass extends SecondClass{ public $var_3; function __construct(){ parent::__construct(); $this->var_3 = "Some Text..."; } } $foo = new SecondClass(); echo($foo->var_2->var); var_dump($foo); $doo = new TheClass(); echo($doo->var_3); echo($doo->$var_2->var); var_dump($doo);

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.0130.00318.18
8.3.50.0110.00418.05
8.3.40.0120.00618.79
8.3.30.0110.00418.98
8.3.20.0040.00420.21
8.3.10.0030.00622.10
8.3.00.0080.00022.43
8.2.180.0100.00616.38
8.2.170.0070.00722.96
8.2.160.0090.00619.04
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0120.00826.16
8.2.120.0070.00317.75
8.2.110.0100.00022.21
8.2.100.0040.00819.45
8.2.90.0040.00419.22
8.2.80.0060.00317.97
8.2.70.0080.00017.50
8.2.60.0050.00317.93
8.2.50.0000.00918.07
8.2.40.0000.00818.22
8.2.30.0040.00417.97
8.2.20.0000.00717.71
8.2.10.0040.00417.73
8.2.00.0040.00417.62
8.1.280.0120.00325.92
8.1.270.0050.00322.14
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0060.00323.98
8.1.230.0040.00719.14
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0070.00317.35
8.1.190.0040.00417.53
8.1.180.0060.00318.60
8.1.170.0000.00818.59
8.1.160.0020.00522.06
8.1.150.0050.00318.70
8.1.140.0040.00417.39
8.1.130.0000.00817.82
8.1.120.0030.00417.40
8.1.110.0040.00417.42
8.1.100.0040.00417.34
8.1.90.0000.00717.50
8.1.80.0050.00317.48
8.1.70.0030.00317.36
8.1.60.0000.00817.54
8.1.50.0000.00817.48
8.1.40.0040.00417.51
8.1.30.0040.00417.60
8.1.20.0050.00317.59
8.1.10.0050.00317.45
8.1.00.0000.00817.53
8.0.300.0000.00718.77
8.0.290.0040.00416.91
8.0.280.0070.00018.33
8.0.270.0000.00717.25
8.0.260.0000.00616.76
8.0.250.0000.00717.00
8.0.240.0030.00617.01
8.0.230.0070.00017.04
8.0.220.0000.00716.85
8.0.210.0000.00716.85
8.0.200.0000.00716.91
8.0.190.0040.00416.95
8.0.180.0070.00016.88
8.0.170.0000.00716.86
8.0.160.0000.00716.84
8.0.150.0000.00716.94
8.0.140.0030.00516.93
8.0.130.0000.00613.37
8.0.120.0000.00816.90
8.0.110.0040.00417.00
8.0.100.0000.00716.95
8.0.90.0040.00416.94
8.0.80.0140.00716.95
8.0.70.0000.00716.97
8.0.60.0050.00216.94
8.0.50.0080.00016.77
8.0.30.0180.00317.06
8.0.20.0090.01017.40
8.0.10.0040.00416.93
8.0.00.0110.00616.73
7.4.330.0000.00615.13
7.4.320.0000.00716.66
7.4.300.0000.00616.64
7.4.290.0000.00716.64
7.4.280.0070.00016.61
7.4.270.0070.00016.59
7.4.260.0060.00316.41
7.4.250.0040.00416.37
7.4.240.0040.00416.60
7.4.230.0030.00316.32
7.4.220.0110.00616.37
7.4.210.0050.00916.62
7.4.200.0000.00716.39
7.4.190.0030.00316.54
7.4.160.0070.00716.48
7.4.150.0070.01017.40
7.4.140.0130.00717.86
7.4.130.0100.00816.48
7.4.120.0080.01316.55
7.4.110.0110.00916.50
7.4.100.0090.01316.59
7.4.90.0120.00816.63
7.4.80.0150.00319.39
7.4.70.0080.01116.22
7.4.60.0100.00616.28
7.4.50.0040.00016.39
7.4.40.0000.01622.77
7.4.30.0140.00316.54
7.4.00.0110.00714.67
7.3.330.0050.00013.21
7.3.320.0020.00213.43
7.3.310.0070.00016.41
7.3.300.0040.00416.41
7.3.290.0060.00916.42
7.3.280.0090.00816.40
7.3.270.0140.00717.40
7.3.260.0090.00916.43
7.3.250.0140.00816.53
7.3.240.0130.00616.44
7.3.230.0090.01216.57
7.3.210.0070.01416.29
7.3.200.0080.00819.39
7.3.190.0060.01516.57
7.3.180.0100.01016.53
7.3.170.0160.00316.59
7.3.160.0100.00716.44
7.3.120.0130.00314.97
7.2.330.0140.02016.84
7.2.320.0070.01816.52
7.2.310.0080.00816.46
7.2.300.0080.00816.62
7.2.290.0110.00816.68
7.2.60.0040.00816.82
7.1.200.0030.00915.63
7.1.70.0030.00617.20
7.1.60.0070.01819.82
7.1.50.0170.00717.02
7.1.00.0070.07322.36
7.0.200.0030.00716.73
7.0.140.0030.07321.95
7.0.60.0100.08320.02
7.0.50.0070.06317.96
7.0.40.0170.07319.96
7.0.30.0170.04320.10
7.0.20.0230.07720.24
7.0.10.0030.06020.33
7.0.00.0130.05720.19
5.6.280.0000.07721.09
5.6.210.0230.06320.51
5.6.200.0070.04318.23
5.6.190.0000.04720.52
5.6.180.0330.04320.33
5.6.170.0270.07320.50
5.6.160.0070.07720.50
5.6.150.0100.05318.19
5.6.140.0100.06318.11
5.6.130.0070.08018.17
5.6.120.0070.05320.90
5.6.110.0130.07021.02
5.6.100.0070.06721.12
5.6.90.0200.07021.11
5.6.80.0000.04320.29
5.6.70.4530.03720.48
5.5.350.0170.07320.44
5.5.340.0070.08018.09
5.5.330.0070.04020.37
5.5.320.0100.04320.34
5.5.310.0270.05720.32
5.5.300.0070.08017.99
5.5.290.0100.05718.03
5.5.280.0130.07320.91
5.5.270.0070.04020.74
5.5.260.0070.09020.77
5.5.250.0100.04020.59
5.5.240.0000.08720.04
5.4.450.0200.05719.61
5.4.440.0270.06719.47
5.4.430.0430.05719.47
5.4.420.0030.06019.61
5.4.410.0430.05719.47
5.4.400.0900.00018.51
5.4.390.0800.00018.57
5.4.380.0330.06018.74
5.4.370.0270.04718.74
5.4.360.0230.05318.77
5.4.350.0230.05718.54
5.4.340.0170.06318.59
5.4.320.0050.03912.50
5.4.310.0050.04212.51
5.4.300.0080.04112.51
5.4.290.0060.04212.50
5.4.280.0100.03712.40
5.4.270.0070.03512.40
5.4.260.0100.05318.89
5.4.250.0130.04318.88
5.4.240.0130.04718.95
5.4.230.0100.05318.74
5.4.220.0100.05018.88
5.4.210.0000.06319.05
5.4.200.0100.05718.88
5.4.190.0070.05718.95
5.4.180.0070.05319.04
5.4.170.0030.06318.98
5.4.160.0100.05018.87
5.4.150.0070.07718.87
5.4.140.0070.05716.55
5.4.130.0030.05016.54
5.4.120.0130.06716.40
5.4.110.0170.06316.51
5.4.100.0030.05316.43
5.4.90.0030.05016.57
5.4.80.0070.07316.39
5.4.70.0070.07716.64
5.4.60.0070.07716.41
5.4.50.0100.06316.29
5.4.40.0170.04016.51
5.4.30.0070.05316.45
5.4.20.0100.06316.43
5.4.10.0030.06316.53
5.4.00.0000.05715.79
5.3.290.0120.04212.80
5.3.280.0000.05714.70
5.3.270.0030.05314.75
5.3.260.0000.07014.52
5.3.250.0100.04714.68
5.3.240.0030.07714.63
5.3.230.0030.05314.44
5.3.220.0030.05714.64
5.3.210.0100.05314.66
5.3.200.0000.05314.77
5.3.190.0030.05714.56
5.3.180.0170.05014.55
5.3.170.0070.07014.64
5.3.160.0070.05714.47
5.3.150.0070.05314.66
5.3.140.0130.07014.69
5.3.130.0130.04714.64
5.3.120.0000.06014.64
5.3.110.0030.05314.78
5.3.100.0030.05314.22
5.3.90.0200.03714.10
5.3.80.0070.07014.18
5.3.70.0000.06014.04
5.3.60.0100.04314.02
5.3.50.0030.05313.95
5.3.40.0030.06014.17
5.3.30.0100.04014.00
5.3.20.0130.06313.53
5.3.10.0070.04713.55
5.3.00.0070.05013.48
5.2.170.0030.04011.23
5.2.160.0000.04311.24
5.2.150.0070.04011.22
5.2.140.0100.03711.23
5.2.130.0100.03711.28
5.2.120.0030.04011.19
5.2.110.0100.04311.10
5.2.100.0000.04710.95
5.2.90.0030.06311.17
5.2.80.0030.05311.19
5.2.70.0070.04311.18
5.2.60.0070.04011.13
5.2.50.0100.04311.20
5.2.40.0070.04011.22
5.2.30.0070.05711.07
5.2.20.0030.05010.87
5.2.10.0030.05710.82
5.2.00.0130.04010.71
5.1.60.0130.03310.05
5.1.50.0030.03310.09
5.1.40.0070.0439.98
5.1.30.0130.03310.31
5.1.20.0030.03710.43
5.1.10.0070.03710.07
5.1.00.0100.03010.27
5.0.50.0070.0278.62
5.0.40.0070.0238.46
5.0.30.0030.0438.24
5.0.20.0030.0338.24
5.0.10.0100.0338.16
5.0.00.0100.0338.14
4.4.90.0000.0236.56
4.4.80.0030.0206.56
4.4.70.0000.0306.56
4.4.60.0030.0276.56
4.4.50.0070.0236.56
4.4.40.0000.0436.56
4.4.30.0100.0136.56
4.4.20.0070.0236.56
4.4.10.0130.0136.56
4.4.00.0030.0306.56
4.3.110.0000.0236.56
4.3.100.0030.0236.56
4.3.90.0030.0206.56
4.3.80.0070.0306.56
4.3.70.0100.0136.56
4.3.60.0070.0176.56
4.3.50.0030.0276.56
4.3.40.0000.0376.56
4.3.30.0000.0236.56
4.3.20.0000.0236.56
4.3.10.0070.0176.56
4.3.00.0000.0237.29

preferences:
51.1 ms | 400 KiB | 5 Q