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.40.0040.01118.82
8.3.30.0140.00419.08
8.3.20.0040.00420.39
8.3.10.0040.00422.10
8.3.00.0040.00722.36
8.2.170.0100.00322.96
8.2.160.0190.00019.04
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00726.16
8.2.120.0040.00717.75
8.2.110.0160.00622.20
8.2.100.0060.00617.84
8.2.90.0090.00017.84
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0000.00717.97
8.2.20.0050.00317.70
8.2.10.0000.00717.62
8.2.00.0080.00017.85
8.1.270.0040.00421.81
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00422.52
8.1.230.0110.00021.03
8.1.220.0000.00817.78
8.1.210.0000.00918.77
8.1.200.0040.00417.25
8.1.190.0060.00317.30
8.1.180.0080.00018.62
8.1.170.0060.00318.73
8.1.160.0050.00222.02
8.1.150.0000.00818.68
8.1.140.0000.00817.39
8.1.130.0040.00417.82
8.1.120.0000.00717.38
8.1.110.0040.00417.36
8.1.100.0000.00717.44
8.1.90.0040.00417.46
8.1.80.0050.00217.45
8.1.70.0030.00317.33
8.1.60.0040.00417.47
8.1.50.0050.00317.41
8.1.40.0090.00017.49
8.1.30.0050.00217.58
8.1.20.0040.00417.70
8.1.10.0000.00717.60
8.1.00.0030.00617.49
8.0.300.0040.00420.00
8.0.290.0040.00417.29
8.0.280.0040.00418.32
8.0.270.0040.00417.17
8.0.260.0070.00016.78
8.0.250.0070.00017.07
8.0.240.0030.00516.93
8.0.230.0030.00317.03
8.0.220.0000.00716.95
8.0.210.0000.00816.82
8.0.200.0030.00317.01
8.0.190.0040.00417.07
8.0.180.0020.00516.99
8.0.170.0000.00816.85
8.0.160.0050.00216.93
8.0.150.0040.00416.85
8.0.140.0070.00016.81
8.0.130.0000.00613.36
8.0.120.0000.00716.98
8.0.110.0000.00816.91
8.0.100.0070.00016.84
8.0.90.0000.00817.02
8.0.80.0090.00617.00
8.0.70.0000.00716.78
8.0.60.0040.00416.82
8.0.50.0040.00416.90
8.0.30.0100.01217.16
8.0.20.0110.01117.40
8.0.10.0000.00717.14
8.0.00.0090.01316.72
7.4.330.0000.00515.00
7.4.320.0000.00816.50
7.4.300.0000.00616.63
7.4.290.0050.00316.51
7.4.280.0040.00416.52
7.4.270.0070.00016.41
7.4.260.0070.00016.55
7.4.250.0040.00416.57
7.4.240.0000.00716.61
7.4.230.0030.00316.71
7.4.220.0140.00316.51
7.4.210.0080.00716.56
7.4.200.0030.00316.41
7.4.190.0000.00716.52
7.4.160.0120.00416.52
7.4.150.0130.00517.40
7.4.140.0090.00817.86
7.4.130.0090.01016.60
7.4.120.0100.00716.51
7.4.110.0060.01216.40
7.4.100.0120.00616.45
7.4.90.0090.00916.56
7.4.80.0130.00919.39
7.4.70.0060.01216.48
7.4.60.0140.00716.43
7.4.50.0060.00316.36
7.4.40.0060.00922.77
7.4.30.0120.00916.58
7.4.00.0000.01214.84
7.3.330.0030.00313.38
7.3.320.0060.00013.41
7.3.310.0030.00316.45
7.3.300.0030.00316.27
7.3.290.0080.00516.42
7.3.280.0110.00616.44
7.3.270.0100.00717.40
7.3.260.0120.00916.50
7.3.250.0070.01416.63
7.3.240.0090.00916.63
7.3.230.0130.01016.39
7.3.210.0130.00516.52
7.3.200.0110.00619.39
7.3.190.0120.01216.36
7.3.180.0080.00816.50
7.3.170.0030.01316.50
7.3.160.0040.01216.43
7.3.120.0090.00914.96
7.3.110.0000.01314.95
7.3.100.0030.00914.73
7.3.90.0000.01515.11
7.3.80.0040.01114.82
7.3.70.0060.00914.87
7.3.60.0000.00814.82
7.3.50.0070.00714.67
7.3.40.0000.01214.73
7.3.30.0070.00714.57
7.3.20.0090.00616.74
7.3.10.0110.00316.43
7.3.00.0040.01216.79
7.2.330.0090.00916.71
7.2.320.0090.01316.75
7.2.310.0090.00916.54
7.2.300.0140.00316.38
7.2.290.0070.01116.52
7.2.240.0040.00714.87
7.2.230.0000.01415.10
7.2.220.0040.01114.92
7.2.210.0030.00815.10
7.2.200.0070.00715.01
7.2.190.0030.00614.96
7.2.180.0030.01314.85
7.2.170.0000.01215.09
7.2.160.0100.00714.98
7.2.150.0000.01016.86
7.2.140.0000.01116.84
7.2.130.0100.00317.02
7.2.120.0030.01417.00
7.2.110.0100.00316.85
7.2.100.0090.00616.54
7.2.90.0100.00316.93
7.2.80.0100.01017.00
7.2.70.0030.01116.86
7.2.60.0060.01016.81
7.2.50.0060.01016.66
7.2.40.0030.01316.84
7.2.30.0040.01217.06
7.2.20.0060.00916.84
7.2.10.0030.00917.04
7.2.00.0070.00316.85
7.1.330.0100.00715.82
7.1.320.0000.00915.85
7.1.310.0000.01415.89
7.1.300.0030.00915.75
7.1.290.0040.01115.79
7.1.280.0130.00315.79
7.1.270.0100.00615.80
7.1.260.0030.01015.75
7.1.250.0140.00315.80
7.1.200.0070.00415.86
7.1.70.0060.00317.21
7.1.60.0060.01919.82
7.1.50.0070.01316.95
7.1.00.0000.09722.50
7.0.200.0040.00416.71
7.0.140.0030.07322.18
7.0.60.0130.08019.79
7.0.50.0100.08017.95
7.0.40.0100.04020.27
7.0.30.0330.05020.24
7.0.20.0270.07720.10
7.0.10.0230.07720.25
7.0.00.0130.07320.07
5.6.280.0100.06721.05
5.6.210.0070.06720.53
5.6.200.0100.08318.15
5.6.190.0030.08020.64
5.6.180.3230.04020.48
5.6.170.0330.08320.47
5.6.160.0100.07020.52
5.6.150.0100.06318.12
5.6.140.0030.08718.21
5.6.130.0130.08018.23
5.6.120.0200.07320.90
5.6.110.0070.08321.04
5.6.100.0130.07721.02
5.6.90.0070.08721.08
5.6.80.0130.03320.43
5.6.70.4400.04020.28
5.5.350.0070.04320.44
5.5.340.0070.03718.00
5.5.330.0000.05720.29
5.5.320.0170.04320.35
5.5.310.0300.04720.41
5.5.300.0200.04717.95
5.5.290.0130.07718.01
5.5.280.0130.07720.86
5.5.270.0130.07020.94
5.5.260.0000.06320.93
5.5.250.0030.04020.55
5.5.240.0030.06720.29
5.4.450.0370.04319.47
5.4.440.0500.05719.70
5.4.430.0530.06019.48
5.4.420.0500.05319.38
5.4.410.0300.04019.21
5.4.400.0900.00018.80
5.4.390.0900.00018.79
5.4.380.0330.05018.61
5.4.370.0230.05718.82
5.4.360.0130.05718.75
5.4.350.0330.05318.74
5.4.340.0300.04718.79
5.4.320.0040.03812.51
5.4.310.0080.03512.50
5.4.300.0030.03912.51
5.4.290.0060.04412.50
5.4.280.0080.03812.40
5.4.270.0040.04612.39
5.4.260.0030.05719.02
5.4.250.0100.05718.96
5.4.240.0100.05018.65
5.4.230.0100.05018.79
5.4.220.0170.06318.76
5.4.210.0170.06719.02
5.4.200.0200.04318.92
5.4.190.0200.04318.79
5.4.180.0200.04318.92
5.4.170.0130.04718.94
5.4.160.0130.06318.64
5.4.150.0100.07318.92
5.4.140.0000.05716.40
5.4.130.0130.06716.40
5.4.120.0130.04016.52
5.4.110.0130.05316.70
5.4.100.0130.04716.61
5.4.90.0030.05016.57
5.4.80.0100.04716.44
5.4.70.0070.06316.45
5.4.60.0030.05316.47
5.4.50.0170.04016.41
5.4.40.0030.05316.38
5.4.30.0100.04716.34
5.4.20.0030.05716.37
5.4.10.0100.05016.37
5.4.00.0030.05015.88
5.3.290.0050.03912.80
5.3.280.0070.05014.76
5.3.270.0070.05314.83
5.3.260.0030.08014.77
5.3.250.0170.04314.84
5.3.240.0130.06014.79
5.3.230.0170.07014.69
5.3.220.0070.05014.56
5.3.210.0070.07314.59
5.3.200.0030.05014.66
5.3.190.0030.07714.56
5.3.180.0130.04314.66
5.3.170.0070.07314.73
5.3.160.0030.05014.71
5.3.150.0100.05014.73
5.3.140.0130.05014.64
5.3.130.0070.05314.57
5.3.120.0070.06714.71
5.3.110.0100.05014.40
5.3.100.0070.05314.14
5.3.90.0030.05313.85
5.3.80.0070.05314.09
5.3.70.0200.03713.93
5.3.60.0100.04714.16
5.3.50.0200.05314.04
5.3.40.0070.05014.13
5.3.30.0070.05013.82
5.3.20.0130.05313.80
5.3.10.0100.06713.73
5.3.00.0130.04313.80
5.2.170.0130.03711.37
5.2.160.0100.03311.12
5.2.150.0030.04311.22
5.2.140.0130.03311.05
5.2.130.0030.05311.09
5.2.120.0070.05711.09
5.2.110.0070.03711.18
5.2.100.0100.03311.33
5.2.90.0070.04311.02
5.2.80.0130.05011.00
5.2.70.0100.04011.25
5.2.60.0000.06711.23
5.2.50.0170.04311.01
5.2.40.0030.04710.98
5.2.30.0030.05711.05
5.2.20.0070.03710.95
5.2.10.0070.04310.84
5.2.00.0030.05710.82
5.1.60.0130.02710.04
5.1.50.0130.0279.97
5.1.40.0030.03710.00
5.1.30.0100.04710.30
5.1.20.0070.04010.37
5.1.10.0030.04710.12
5.1.00.0100.04710.31
5.0.50.0130.0238.63
5.0.40.0100.0208.65
5.0.30.0070.0508.30
5.0.20.0100.0238.04
5.0.10.0070.0338.13
5.0.00.0030.0438.26
4.4.90.0100.0276.54
4.4.80.0000.0376.54
4.4.70.0100.0236.54
4.4.60.0000.0276.54
4.4.50.0030.0306.54
4.4.40.0000.0406.54
4.4.30.0000.0236.54
4.4.20.0000.0236.54
4.4.10.0000.0236.54
4.4.00.0030.0376.54
4.3.110.0030.0206.54
4.3.100.0000.0336.54
4.3.90.0000.0336.54
4.3.80.0030.0376.54
4.3.70.0030.0206.54
4.3.60.0030.0276.54
4.3.50.0030.0206.54
4.3.40.0030.0336.54
4.3.30.0070.0236.54
4.3.20.0000.0306.54
4.3.10.0030.0206.54
4.3.00.0070.0207.29

preferences:
39.96 ms | 400 KiB | 5 Q