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_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.0090.00618.30
8.3.50.0160.00522.11
8.3.40.0070.00718.77
8.3.30.0110.00419.13
8.3.20.0050.00320.16
8.3.10.0040.00421.96
8.3.00.0070.00322.32
8.2.180.0060.01316.63
8.2.170.0110.00422.96
8.2.160.0100.00319.16
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00317.50
8.2.110.0050.00522.26
8.2.100.0120.00019.45
8.2.90.0060.00319.27
8.2.80.0000.00818.04
8.2.70.0040.00417.50
8.2.60.0060.00318.03
8.2.50.0030.00518.07
8.2.40.0040.00418.16
8.2.30.0070.00018.12
8.2.20.0040.00417.54
8.2.10.0040.00417.63
8.2.00.0040.00417.74
8.1.280.0130.00725.92
8.1.270.0040.00421.93
8.1.260.0050.00226.35
8.1.250.0070.00028.09
8.1.240.0040.00423.74
8.1.230.0100.00019.15
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0060.00317.23
8.1.190.0060.00317.39
8.1.180.0040.00418.77
8.1.170.0000.00918.50
8.1.160.0040.00422.09
8.1.150.0040.00418.50
8.1.140.0050.00217.49
8.1.130.0000.00717.82
8.1.120.0040.00417.39
8.1.110.0080.00017.39
8.1.100.0040.00417.29
8.1.90.0030.00517.41
8.1.80.0030.00317.39
8.1.70.0000.00717.38
8.1.60.0090.00017.59
8.1.50.0000.00717.58
8.1.40.0000.00817.52
8.1.30.0050.00317.66
8.1.20.0060.00317.67
8.1.10.0030.00617.49
8.1.00.0040.00417.56
8.0.300.0040.00418.77
8.0.290.0080.00017.04
8.0.280.0080.00018.36
8.0.270.0050.00217.20
8.0.260.0000.00716.81
8.0.250.0040.00416.93
8.0.240.0000.00716.89
8.0.230.0030.00316.93
8.0.220.0000.00716.68
8.0.210.0000.00816.87
8.0.200.0030.00316.92
8.0.190.0040.00416.91
8.0.180.0050.00316.85
8.0.170.0040.00416.85
8.0.160.0000.00716.69
8.0.150.0040.00416.73
8.0.140.0000.00716.64
8.0.130.0030.00313.26
8.0.120.0000.00716.75
8.0.110.0040.00416.84
8.0.100.0040.00416.82
8.0.90.0030.00516.82
8.0.80.0070.01116.71
8.0.70.0050.00216.90
8.0.60.0000.00716.70
8.0.50.0040.00416.61
8.0.30.0120.01016.99
8.0.20.0090.00917.40
8.0.10.0040.00417.02
8.0.00.0110.01216.93
7.4.330.0050.00015.00
7.4.320.0030.00316.56
7.4.300.0030.00316.54
7.4.290.0000.00716.48
7.4.280.0050.00316.51
7.4.270.0030.00316.50
7.4.260.0000.00716.54
7.4.250.0040.00416.39
7.4.240.0020.00516.61
7.4.230.0000.00816.67
7.4.220.0100.00716.43
7.4.210.0080.00816.58
7.4.200.0070.00016.48
7.4.190.0050.00316.69
7.4.160.0120.00416.61
7.4.150.0080.00817.40
7.4.140.0140.00517.86
7.4.130.0120.00716.49
7.4.120.0120.00616.67
7.4.110.0040.01416.65
7.4.100.0070.01016.60
7.4.90.0090.00916.44
7.4.80.0070.01019.39
7.4.70.0060.01616.56
7.4.60.0120.00416.51
7.4.50.0000.00416.52
7.4.40.0080.00522.77
7.4.30.0150.00916.26
7.4.00.0090.00314.93
7.3.330.0050.00013.33
7.3.320.0000.00613.16
7.3.310.0000.00616.33
7.3.300.0000.00716.28
7.3.290.0070.00716.32
7.3.280.0090.00616.28
7.3.270.0110.00517.40
7.3.260.0130.00816.32
7.3.250.0090.00916.50
7.3.240.0090.00616.43
7.3.230.0090.00916.39
7.3.210.0090.00916.35
7.3.200.0130.00319.39
7.3.190.0060.01216.16
7.3.180.0120.00616.35
7.3.170.0100.01016.42
7.3.160.0060.01116.29
7.3.120.0090.00614.59
7.2.330.0060.01616.82
7.2.320.0090.01016.70
7.2.310.0000.01716.51
7.2.300.0060.01216.62
7.2.290.0090.00916.83
7.2.60.0090.00316.79
7.2.00.0060.00919.46
7.1.200.0090.00415.79
7.1.100.0090.00317.97
7.1.70.0070.00317.09
7.1.60.0120.01219.82
7.1.50.0060.01816.70
7.1.00.0070.07322.54
7.0.200.0000.01016.82
7.0.140.0070.07021.92
7.0.60.0100.07720.05
7.0.50.0030.07317.90
7.0.40.0030.07320.27
7.0.30.0270.06320.34
7.0.20.0300.04320.09
7.0.10.0170.08320.26
7.0.00.0070.08020.07
5.6.280.0000.07721.10
5.6.210.0100.06320.51
5.6.200.0070.04718.29
5.6.190.0100.04320.67
5.6.180.3470.04320.52
5.6.170.0300.04720.55
5.6.160.0030.04320.39
5.6.150.0000.08718.29
5.6.140.0030.08018.14
5.6.130.0100.03318.29
5.6.120.0100.07321.04
5.6.110.0130.08321.11
5.6.100.0070.05021.02
5.6.90.0070.05020.88
5.6.80.0030.04020.38
5.6.70.4230.03720.53
5.5.350.0000.03720.43
5.5.340.0070.03717.98
5.5.330.0070.08720.27
5.5.320.0270.07720.35
5.5.310.0270.07320.31
5.5.300.0130.07717.95
5.5.290.0000.05017.98
5.5.280.0100.06020.88
5.5.270.0130.06320.73
5.5.260.0030.04020.80
5.5.250.0200.07020.50
5.5.240.0070.06320.20
5.4.450.1370.05019.31
5.4.440.1770.04319.31
5.4.430.1770.04019.56
5.4.420.1700.04319.46
5.4.410.1770.04019.44
5.4.400.1600.03318.95
5.4.390.1570.03719.08
5.4.380.1430.02719.00
5.4.370.1370.03719.11
5.4.360.1600.03319.14
5.4.350.1770.03019.07
5.4.340.1800.03018.98
5.4.320.1400.04019.20
5.4.310.0100.04019.25
5.4.300.0030.03719.16
5.4.290.0800.04719.00
5.4.280.2270.03019.06
5.4.270.1530.03719.02
5.4.260.1670.03019.24
5.4.250.1530.04019.19
5.4.240.1870.04319.31
5.4.230.1500.03319.08
5.4.220.1670.04319.22
5.4.210.1900.05019.21
5.4.200.1930.04319.19
5.4.190.0270.04719.14
5.4.180.0130.04318.86
5.4.170.0300.04018.88
5.4.160.0130.04019.20
5.4.150.0100.03319.14
5.4.140.0170.04716.55
5.4.130.0130.06016.39
5.4.120.0100.04016.46
5.4.110.0130.03716.50
5.4.100.0200.07316.45
5.4.90.0170.03316.61
5.4.80.0230.04016.55
5.4.70.0230.06016.31
5.4.60.0200.04316.43
5.4.50.0230.04316.42
5.4.40.0200.04316.55
5.4.30.0130.03716.43
5.4.20.0300.04316.55
5.4.10.0130.05016.34
5.4.00.0170.03315.95
5.3.290.0070.04714.79
5.3.280.0100.04314.61
5.3.270.0200.03314.62
5.3.260.0130.05314.53
5.3.250.0170.03714.58
5.3.240.0170.03714.72
5.3.230.0200.04014.51
5.3.220.0170.03714.55
5.3.210.0170.03714.54
5.3.200.0170.04014.57
5.3.190.0230.04714.64
5.3.180.0130.03714.55
5.3.170.0270.03714.49
5.3.160.0170.06014.58
5.3.150.0100.06314.47
5.3.140.0030.06014.46
5.3.130.0170.05014.47
5.3.120.0130.04014.63
5.3.110.0130.04014.61
5.3.100.0070.04314.02
5.3.90.0130.04013.93
5.3.80.0100.04314.03
5.3.70.0170.04313.97
5.3.60.0130.03713.91
5.3.50.0200.03313.87
5.3.40.0130.03714.04
5.3.30.0130.03713.92
5.3.20.0130.03713.78
5.3.10.0230.04013.56
5.3.00.0170.03313.62
5.2.170.0130.02711.38
5.2.160.0130.02711.11
5.2.150.0070.03311.16
5.2.140.0170.02311.30
5.2.130.0130.02711.04
5.2.120.0130.02711.03
5.2.110.0170.02711.02
5.2.100.0100.03011.26
5.2.90.0130.02711.04
5.2.80.0200.03311.20
5.2.70.0070.03311.03
5.2.60.0100.03311.13
5.2.50.0100.03011.15
5.2.40.0170.02710.91
5.2.30.0100.02710.95
5.2.20.0230.02711.01
5.2.10.0030.03310.79
5.2.00.0100.02710.78
5.1.60.0130.02010.02
5.1.50.0100.02310.13
5.1.40.0170.01710.11
5.1.30.0070.02710.48
5.1.20.0030.03310.45
5.1.10.0070.0239.99
5.1.00.0000.04010.15
5.0.50.0000.0238.64
5.0.40.0030.0208.33
5.0.30.0570.0278.17
5.0.20.0530.0208.10
5.0.10.0570.0178.18
5.0.00.0530.0308.25
4.4.90.0500.0177.72
4.4.80.0530.0137.72
4.4.70.0500.0177.72
4.4.60.0570.0137.72
4.4.50.0530.0137.72
4.4.40.0530.0237.72
4.4.30.0530.0137.72
4.4.20.0430.0177.72
4.4.10.0670.0207.72
4.4.00.0670.0277.72
4.3.110.0570.0137.72
4.3.100.0570.0137.72
4.3.90.0500.0177.72
4.3.80.0500.0277.72
4.3.70.0530.0137.72
4.3.60.0570.0107.72
4.3.50.0430.0107.72
4.3.40.0600.0237.72
4.3.30.0270.0137.72
4.3.20.0230.0177.72
4.3.10.0230.0177.72
4.3.00.0300.0207.72

preferences:
41.67 ms | 401 KiB | 5 Q