3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { public function __get($name) { $this->__set($name, new C); return $this->$name; } public function __set($name, $value) { $this->$name = $value; } } class C { public function test() { return new D; } } class D { public $d; } $b = new B; $b->c->test()->d = 'waa'; echo 'first call success' . PHP_EOL; $b->c->test(); echo 'just a call to test() works' . PHP_EOL; $b->c->test()->d = 'waa'; echo 'second call success' . PHP_EOL;

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.0180.00416.63
8.3.50.0120.01022.89
8.3.40.0030.01418.79
8.3.30.0040.01119.23
8.3.20.0000.00820.21
8.3.10.0080.00023.65
8.3.00.0050.00317.63
8.2.180.0030.01318.29
8.2.170.0110.00422.96
8.2.160.0070.00720.28
8.2.150.0000.00824.18
8.2.140.0050.00224.66
8.2.130.0080.00026.16
8.2.120.0030.00621.08
8.2.110.0030.00620.44
8.2.100.0040.00717.91
8.2.90.0070.00019.09
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0070.00317.93
8.2.50.0040.00418.07
8.2.40.0090.00018.22
8.2.30.0000.00718.06
8.2.20.0080.00017.73
8.2.10.0030.00517.97
8.2.00.0000.00817.59
8.1.280.0070.00725.92
8.1.270.0060.00323.96
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00023.91
8.1.230.0110.00019.04
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00917.35
8.1.180.0000.00818.10
8.1.170.0090.00318.52
8.1.160.0040.00422.02
8.1.150.0050.00318.93
8.1.140.0040.00417.36
8.1.130.0070.00017.75
8.1.120.0000.00717.34
8.1.110.0000.00817.45
8.1.100.0020.00517.36
8.1.90.0000.00717.34
8.1.80.0000.00717.43
8.1.70.0030.00317.39
8.1.60.0050.00517.59
8.1.50.0040.00417.45
8.1.40.0000.00817.48
8.1.30.0040.00417.63
8.1.20.0070.00017.69
8.1.10.0000.00717.63
8.1.00.0070.00017.51
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0030.00318.36
8.0.270.0040.00417.26
8.0.260.0000.00617.37
8.0.250.0040.00416.98
8.0.240.0040.00417.01
8.0.230.0030.00316.95
8.0.220.0070.00016.92
8.0.210.0040.00416.77
8.0.200.0080.00016.95
8.0.190.0000.00716.96
8.0.180.0070.00016.80
8.0.170.0000.00816.85
8.0.160.0030.00316.85
8.0.150.0040.00416.86
8.0.140.0050.00216.91
8.0.130.0030.00313.32
8.0.120.0000.00716.86
8.0.110.0000.00716.86
8.0.100.0030.00516.90
8.0.90.0000.00716.73
8.0.80.0110.00916.89
8.0.70.0040.00416.76
8.0.60.0040.00416.96
8.0.50.0040.00416.88
8.0.30.0160.00716.78
8.0.20.0090.01617.40
8.0.10.0050.00317.00
8.0.00.0060.01316.70
7.4.330.0060.00015.00
7.4.320.0030.00316.55
7.4.300.0000.00616.51
7.4.290.0000.00716.55
7.4.280.0000.00716.57
7.4.270.0030.00316.52
7.4.260.0000.00716.54
7.4.250.0000.00816.54
7.4.240.0020.00516.59
7.4.230.0000.00716.51
7.4.220.0100.01016.54
7.4.210.0140.00616.54
7.4.200.0040.00516.70
7.4.160.0130.00416.56
7.4.150.0040.01317.40
7.4.140.0110.00717.86
7.4.130.0110.00616.47
7.4.120.0140.00516.55
7.4.110.0130.00916.36
7.4.100.0120.00616.52
7.4.90.0150.00916.37
7.4.80.0110.00719.39
7.4.70.0110.01116.51
7.4.60.0030.01416.32
7.4.50.0050.00016.36
7.4.40.0040.01516.38
7.4.30.0170.00316.59
7.4.10.0100.00714.74
7.4.00.0120.00314.83
7.3.330.0030.00313.36
7.3.320.0060.00013.12
7.3.310.0000.00716.22
7.3.300.0030.00316.40
7.3.290.0040.01016.30
7.3.280.0080.01216.34
7.3.270.0090.00917.40
7.3.260.0140.00516.71
7.3.250.0060.01316.36
7.3.240.0100.00716.31
7.3.230.0070.01116.57
7.3.210.0140.00316.30
7.3.200.0080.00819.39
7.3.190.0100.01016.54
7.3.180.0070.01116.43
7.3.170.0110.00516.50
7.3.160.0090.00616.34
7.3.130.0110.00714.79
7.3.120.0110.00714.89
7.3.110.0040.01414.71
7.3.100.0100.00315.03
7.3.90.0060.00614.76
7.3.80.0030.01514.70
7.3.70.0030.01014.66
7.3.60.0000.01414.62
7.3.50.0030.00914.87
7.3.40.0030.00914.72
7.3.30.0060.00914.90
7.3.20.0090.00616.63
7.3.10.0040.00816.59
7.3.00.0040.00816.80
7.2.330.0080.01016.85
7.2.320.0110.00816.80
7.2.310.0110.00716.59
7.2.300.0100.00916.77
7.2.290.0060.01016.41
7.2.260.0100.01014.93
7.2.250.0140.00315.13
7.2.240.0030.01015.02
7.2.230.0000.01214.62
7.2.220.0030.00614.63
7.2.210.0040.00414.86
7.2.200.0080.00514.67
7.2.190.0050.00514.97
7.2.180.0030.01015.16
7.2.170.0030.01015.16
7.2.160.0080.00414.98
7.2.150.0050.00516.66
7.2.140.0030.00616.96
7.2.130.0030.01316.90
7.2.120.0050.00516.85
7.2.110.0100.00716.70
7.2.100.0090.00616.76
7.2.90.0040.01216.75
7.2.80.0120.00416.75
7.2.70.0000.01016.83
7.2.60.0000.01416.55
7.2.50.0070.01116.97
7.2.40.0070.01117.02
7.2.30.0060.00617.06
7.2.20.0060.00616.72
7.2.10.0100.00716.90
7.2.00.0060.00718.01
7.1.330.0090.00615.77
7.1.320.0120.00615.57
7.1.310.0040.00816.02
7.1.300.0080.00315.55
7.1.290.0040.00815.90
7.1.280.0030.00915.64
7.1.270.0080.00415.73
7.1.260.0030.00615.80
7.1.250.0060.00315.69
7.1.240.0000.01215.59
7.1.230.0000.00815.89
7.1.220.0070.00715.81
7.1.210.0040.01115.78
7.1.200.0000.01315.75
7.1.190.0090.00615.73
7.1.180.0080.00315.66
7.1.170.0070.00715.92
7.1.160.0100.00715.86
7.1.150.0110.00315.84
7.1.140.0090.00615.82
7.1.130.0070.00715.86
7.1.120.0030.00915.66
7.1.110.0030.01015.66
7.1.100.0030.01017.03
7.1.90.0070.01015.61
7.1.80.0080.00815.83
7.1.70.0020.00716.29
7.1.60.0110.00817.58
7.1.50.0090.00716.35
7.1.40.0000.01315.71
7.1.30.0180.00015.55
7.1.20.0030.00915.75
7.1.10.0030.00715.45
7.1.00.0050.04219.06
7.0.330.0030.01315.19
7.0.320.0030.00915.48
7.0.310.0100.00315.27
7.0.300.0040.01115.36
7.0.290.0000.00815.29
7.0.280.0070.00415.38
7.0.270.0000.01515.47
7.0.260.0040.01115.60
7.0.250.0050.00315.55
7.0.240.0090.00315.21
7.0.230.0080.00815.31
7.0.220.0050.00515.46
7.0.210.0030.00915.49
7.0.200.0340.01015.15
7.0.190.0030.00915.34
7.0.180.0050.00315.30
7.0.170.0000.01015.21
7.0.160.0130.00015.28
7.0.150.0110.00315.46
7.0.140.0050.03818.71
7.0.130.0090.00615.34
7.0.120.0120.00615.15
7.0.110.0070.01015.46
7.0.100.0000.01115.50
7.0.90.0090.00315.22
7.0.80.0080.00815.43
7.0.70.0030.01015.55
7.0.60.0090.02917.71
7.0.50.0030.04016.60
7.0.40.0030.04916.71
7.0.30.0140.04216.81
7.0.20.0170.02216.75
7.0.10.0130.04016.76
7.0.00.0060.03116.81
5.6.400.0040.01114.18
5.6.390.0030.01314.27
5.6.380.0120.00013.87
5.6.370.0070.00714.29
5.6.360.0110.00714.50
5.6.350.0060.00614.32
5.6.340.0070.00314.46
5.6.330.0100.00714.65
5.6.320.0000.00814.51
5.6.310.0080.00314.19
5.6.300.0040.00913.98
5.6.290.0030.01114.52
5.6.280.0020.04517.69
5.6.270.0120.00614.08
5.6.260.0120.00014.30
5.6.250.0080.00314.12
5.6.240.0090.00614.61
5.6.230.0040.01114.44
5.6.220.0060.00614.32
5.6.210.0050.03517.43
5.6.200.0030.04216.20
5.6.190.0120.02217.40
5.6.180.0220.02717.40
5.6.170.0180.02317.36
5.6.160.0070.02817.41
5.6.150.0080.04316.23
5.6.140.0040.03016.24
5.6.130.0100.02616.38
5.6.120.0050.04317.71
5.6.110.0130.04017.75
5.6.100.0130.04217.55
5.6.90.0050.04417.75
5.6.80.0080.04517.25
5.6.70.0090.00314.19
5.6.60.0030.00614.06
5.6.50.0070.01014.27
5.6.40.0060.00314.45
5.6.30.0110.00414.33
5.6.20.0070.00414.16
5.6.10.0070.00714.30
5.6.00.0000.01114.18
5.5.380.0150.00014.38
5.5.370.0070.00714.01
5.5.360.0000.01314.46
5.5.350.0140.03917.29
5.5.340.0120.03516.04
5.5.330.0080.04117.17
5.5.320.0080.02517.32
5.5.310.0200.03917.18
5.5.300.0100.04016.00
5.5.290.0050.02416.12
5.5.280.0050.02817.63
5.5.270.0050.02917.46
5.5.260.0080.04517.67
5.5.250.0070.04317.49
5.5.240.0070.04117.23
5.5.230.0070.00714.27
5.5.220.0090.00614.18
5.5.210.0030.00914.27
5.5.200.0040.00714.21
5.5.190.0000.00814.47
5.5.180.0070.00714.24
5.5.170.0070.00714.27
5.5.160.0030.01014.09
5.5.150.0030.00614.41
5.5.140.0060.00614.00
5.5.130.0060.00314.12
5.5.120.0100.00314.15
5.5.110.0090.00613.84
5.5.100.0040.00413.98
5.5.90.0060.00314.35
5.5.80.0000.01514.19
5.5.70.0070.00714.20
5.5.60.0090.00614.44
5.5.50.0030.01014.20
5.5.40.0030.01014.00
5.5.30.0030.01014.45
5.5.20.0090.00314.20
5.5.10.0110.00414.01
5.5.00.0070.01014.25
5.4.450.1730.02215.31
5.4.440.2140.02515.16
5.4.430.1650.02315.35
5.4.420.1670.02015.35
5.4.410.1950.01815.35
5.4.400.1950.02015.19
5.4.390.1850.02015.01
5.4.380.1780.02215.31
5.4.370.1530.02015.12
5.4.360.1780.01815.09
5.4.350.1630.02014.95
5.4.340.1750.02415.08
5.4.330.0030.00311.14
5.4.320.1630.02815.05
5.4.310.1830.02015.12
5.4.300.1680.02315.18
5.4.290.1830.02015.20
5.4.280.1250.02515.08
5.4.270.1730.02615.17
5.4.260.1740.02315.21
5.4.250.1750.02415.01
5.4.240.1750.02415.18
5.4.230.1850.02315.14
5.4.220.1810.02115.12
5.4.210.1870.02615.05
5.4.200.1760.02415.05
5.4.190.1470.02015.18
5.4.180.1650.01815.15
5.4.170.1510.02115.20
5.4.160.1740.01814.96
5.4.150.1860.02014.94
5.4.140.1870.02513.79
5.4.130.1680.02013.92
5.4.120.1970.02213.88
5.4.110.1760.02013.83
5.4.100.1870.01713.79
5.4.90.1810.01813.63
5.4.80.1690.02013.80
5.4.70.1620.02213.83
5.4.60.1670.02313.86
5.4.50.1780.02413.79
5.4.40.1740.01513.78
5.4.30.1650.02113.77
5.4.20.1720.01813.78
5.4.10.1680.02013.77
5.4.00.1770.02413.48
5.3.290.3400.03314.69
5.3.280.3470.03314.72
5.3.270.3770.03714.66
5.3.260.3370.04314.52
5.3.250.3430.04014.51
5.3.240.3330.03714.70
5.3.230.3500.03314.75
5.3.220.4070.03314.69
5.3.210.3570.03014.71
5.3.200.3470.03714.68
5.3.190.3400.03714.47
5.3.180.3370.03714.57
5.3.170.3270.03714.66
5.3.160.3200.04014.42
5.3.150.3470.03714.58
5.3.140.3500.03314.79
5.3.130.3530.04014.56
5.3.120.3270.03314.55
5.3.110.3430.03314.55
5.3.100.3500.04014.06
5.3.90.3470.04014.10
5.3.80.0070.07313.94
5.3.70.0030.06014.25
5.3.60.0000.04313.91
5.3.50.1770.04713.88
5.3.40.3470.03313.94
5.3.30.3470.03713.93
5.3.20.3430.04313.63
5.3.10.3470.03713.68
5.3.00.3730.03313.72
5.2.170.3130.03711.08
5.2.160.2970.03011.09
5.2.150.3200.02711.21
5.2.140.3330.03711.07
5.2.130.2970.03011.34
5.2.120.2870.02711.02
5.2.110.2900.02711.04
5.2.100.3030.03011.07
5.2.90.2830.02711.09
5.2.80.2270.03011.11
5.2.70.2770.02711.22
5.2.60.2730.03311.06
5.2.50.2770.03011.03
5.2.40.2270.03011.11
5.2.30.2570.02710.89
5.2.20.2500.02710.91
5.2.10.2300.02710.95
5.2.00.2230.03010.73
5.1.60.2430.0209.93
5.1.50.2400.0239.99
5.1.40.2370.02310.11
5.1.30.2430.02310.57
5.1.20.1170.01710.29
5.1.10.0100.0409.95
5.1.00.0100.03310.05
5.0.50.0070.0409.30
5.0.40.0030.0439.30
5.0.30.0000.0639.30
5.0.20.0070.0409.30
5.0.10.0000.0309.30
5.0.00.0730.0339.30
4.4.90.1570.0209.30
4.4.80.1330.0139.30
4.4.70.1400.0139.30
4.4.60.1600.0209.30
4.4.50.1430.0209.30
4.4.40.1100.0239.30
4.4.30.1300.0209.30
4.4.20.1270.0239.30
4.4.10.1400.0179.30
4.4.00.1370.0309.30
4.3.110.1300.0109.30
4.3.100.1300.0179.30
4.3.90.1370.0139.30
4.3.80.1100.0209.30
4.3.70.1070.0139.30
4.3.60.1470.0139.30
4.3.50.1100.0139.30
4.3.40.1400.0239.30
4.3.30.0600.0139.30
4.3.20.0530.0179.30
4.3.10.0770.0239.30
4.3.00.0770.0209.30

preferences:
37.92 ms | 401 KiB | 5 Q