3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Derp; abstract class A { public $stuff = array(); abstract public function __construct(); } class B extends A { protected $kids; protected $log; public function __construct() { } public function bee() { $this->kids = new C($this); $this->kids->cee(); echo "Buzz bee\n"; } public function updateLog($msg) { $this->log[] = $msg; echo "Adddig log $msg\n"; } } class C { public $Cups = "cCup"; public function __construct($b) { //$this->bee(); $this->Cups = $b; echo "Building c\n"; } public function cee() { $this->stuff = array("MyStuff"); $this->Cups->updateLog("This"); $this->Cups->updateLog("That"); echo "In cee\n"; } } $b = new B(); $x = $b->bee(); var_dump($x);

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.0110.00418.52
8.3.50.0150.00722.05
8.3.40.0000.01518.78
8.3.30.0070.00719.27
8.3.20.0070.00020.16
8.3.10.0040.00423.56
8.3.00.0050.00319.12
8.2.180.0080.00816.75
8.2.170.0120.00322.96
8.2.160.0100.00322.17
8.2.150.0000.00924.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00021.05
8.2.110.0070.01122.20
8.2.100.0000.01317.91
8.2.90.0080.00419.30
8.2.80.0060.00317.97
8.2.70.0000.00817.75
8.2.60.0000.00818.16
8.2.50.0060.00318.07
8.2.40.0040.00418.28
8.2.30.0090.00018.14
8.2.20.0000.00817.64
8.2.10.0000.00718.05
8.2.00.0040.00417.88
8.1.280.0110.00425.92
8.1.270.0080.00019.00
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.91
8.1.230.0000.01119.16
8.1.220.0000.00917.74
8.1.210.0050.00318.77
8.1.200.0030.00717.35
8.1.190.0000.00917.22
8.1.180.0030.00518.89
8.1.170.0030.00718.54
8.1.160.0020.00522.01
8.1.150.0050.00318.91
8.1.140.0000.00817.29
8.1.130.0000.00717.84
8.1.120.0040.00417.44
8.1.110.0050.00317.33
8.1.100.0050.00217.39
8.1.90.0000.00717.41
8.1.80.0030.00417.31
8.1.70.0030.00617.31
8.1.60.0000.00817.53
8.1.50.0040.00417.50
8.1.40.0040.00417.39
8.1.30.0080.00017.58
8.1.20.0070.00017.65
8.1.10.0040.00417.45
8.1.00.0040.00417.51
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00318.42
8.0.270.0040.00417.28
8.0.260.0000.00617.34
8.0.250.0000.00716.98
8.0.240.0050.00316.93
8.0.230.0000.00816.98
8.0.220.0000.00716.78
8.0.210.0040.00416.87
8.0.200.0000.00716.99
8.0.190.0040.00416.96
8.0.180.0070.00016.88
8.0.170.0080.00316.86
8.0.160.0050.00217.01
8.0.150.0000.00716.89
8.0.140.0000.00716.78
8.0.130.0050.00313.33
8.0.120.0050.00316.86
8.0.110.0040.00416.98
8.0.100.0040.00416.74
8.0.90.0040.00416.86
8.0.80.0060.00916.79
8.0.70.0050.00316.71
8.0.60.0000.00816.78
8.0.50.0040.00416.90
8.0.30.0140.00716.98
8.0.20.0100.00817.40
8.0.10.0040.00416.84
8.0.00.0160.00716.77
7.4.330.0050.00015.21
7.4.320.0000.00616.36
7.4.300.0030.00316.59
7.4.290.0030.00316.45
7.4.280.0080.00016.59
7.4.270.0030.00916.61
7.4.260.0040.00416.55
7.4.250.0080.00016.61
7.4.240.0010.00616.50
7.4.230.0030.00316.52
7.4.220.0090.01516.49
7.4.210.0090.00616.66
7.4.200.0040.00416.36
7.4.160.0090.00616.41
7.4.150.0140.00317.40
7.4.140.0110.01017.86
7.4.130.0070.00916.64
7.4.120.0120.00816.53
7.4.110.0100.01016.47
7.4.100.0100.00716.33
7.4.90.0060.01116.65
7.4.80.0090.01319.39
7.4.70.0110.00616.55
7.4.60.0040.01216.42
7.4.50.0030.00616.37
7.4.40.0160.00016.47
7.4.30.0100.00716.63
7.4.00.0070.00915.01
7.3.330.0000.00813.30
7.3.320.0070.00013.20
7.3.310.0030.00316.37
7.3.300.0080.00016.18
7.3.290.0070.00816.36
7.3.280.0120.00316.38
7.3.270.0110.00617.40
7.3.260.0090.00916.60
7.3.250.0130.00516.50
7.3.240.0150.00316.71
7.3.230.0100.01316.62
7.3.210.0170.00716.54
7.3.200.0270.01019.39
7.3.190.0120.01016.61
7.3.180.0070.01016.56
7.3.170.0140.00716.37
7.3.160.0090.00616.32
7.3.120.0110.00614.73
7.3.110.0130.00615.01
7.3.100.0040.01114.82
7.3.90.0090.00614.68
7.3.80.0090.00614.90
7.3.70.0060.00614.80
7.3.60.0060.00614.71
7.3.50.0110.00014.57
7.3.40.0040.00814.67
7.3.30.0030.01214.92
7.3.20.0000.01416.76
7.3.10.0060.00316.37
7.3.00.0060.00816.69
7.2.330.0090.01216.76
7.2.320.0070.01016.50
7.2.310.0130.01316.66
7.2.300.0130.01016.64
7.2.290.0070.01016.36
7.2.250.0130.00615.23
7.2.240.0030.01714.91
7.2.230.0030.01315.27
7.2.220.0030.01015.28
7.2.210.0060.00915.12
7.2.200.0000.01014.83
7.2.190.0040.00715.25
7.2.180.0000.01415.10
7.2.170.0060.01215.14
7.2.60.0060.01016.98
7.2.00.0000.01519.36
7.1.330.0040.01115.56
7.1.320.0060.00615.89
7.1.310.0040.00815.65
7.1.300.0060.00915.61
7.1.290.0080.00815.60
7.1.280.0130.00315.52
7.1.270.0050.00515.71
7.1.260.0100.00316.01
7.1.200.0090.00615.88
7.1.100.0070.00718.43
7.1.70.0000.00717.34
7.1.60.0040.02119.46
7.1.50.0030.02016.97
7.1.00.0030.07722.43
7.0.200.0030.00616.60
7.0.140.0000.05322.08
7.0.60.0070.05720.02
7.0.50.0000.05717.99
7.0.40.0070.04720.20
7.0.30.0430.04320.30
7.0.20.0300.07320.23
7.0.10.0130.06320.07
7.0.00.0000.04720.33
5.6.280.0000.07721.13
5.6.210.0100.05720.52
5.6.200.0100.08318.18
5.6.190.0030.04320.58
5.6.180.0230.05720.63
5.6.170.0230.06320.55
5.6.160.0130.07720.42
5.6.150.0100.03718.17
5.6.140.0100.06718.17
5.6.130.0030.08018.23
5.6.120.0170.07321.13
5.6.110.0100.08321.11
5.6.100.0100.07021.08
5.6.90.0030.08320.89
5.6.80.0100.03720.39
5.5.350.4100.04320.44
5.5.340.0130.05017.96
5.5.330.0030.09020.43
5.5.320.0130.04720.38
5.5.310.0270.06320.41
5.5.300.0070.06318.04
5.5.290.0070.08718.00
5.5.280.0170.08020.66
5.5.270.0030.04720.74
5.5.260.0100.07720.85
5.5.250.0100.07020.63
5.5.240.0000.08020.38
5.4.450.0770.05719.20
5.4.440.0830.05019.41
5.4.430.0900.05019.66
5.4.420.0800.05719.42
5.4.410.1000.05319.32
5.4.400.0800.05719.07
5.4.390.0200.05318.63
5.4.380.0330.04718.78
5.4.370.0230.05018.63
5.4.360.0270.04718.61
5.4.350.0230.05018.73
5.4.340.0270.04718.76
5.4.320.0170.06018.62
5.4.310.0270.04718.89
5.4.300.0200.05718.57
5.4.290.0130.06318.63
5.4.280.0300.04718.78
5.4.270.0200.05718.57
5.4.260.0170.05718.46
5.4.250.0200.05318.60
5.4.240.0170.06018.52
5.4.230.0170.05718.57
5.4.220.0330.04718.78
5.4.210.0300.04718.52
5.4.200.0200.05316.69
5.4.190.0170.05718.56
5.4.180.0200.06318.69
5.4.170.0130.06718.59
5.4.160.0230.04718.76
5.4.150.0300.04318.72
5.4.140.0270.04316.47
5.4.130.0200.05016.20
5.4.120.0270.04016.47
5.4.110.0170.05016.32
5.4.100.0230.05716.43
5.4.90.0230.05016.24
5.4.80.0230.04716.21
5.4.70.0130.05716.27
5.4.60.0200.05016.20
5.4.50.0230.04716.29
5.4.40.0200.05316.31
5.4.30.0230.04716.14
5.4.20.0270.04716.27
5.4.10.0230.04716.20
5.4.00.0100.05715.75
5.3.290.0300.04314.90
5.3.280.0130.05714.71
5.3.270.0230.05314.68
5.3.260.0330.04314.73
5.3.250.0270.04714.69
5.3.240.0130.05714.61
5.3.230.0170.06314.64
5.3.220.0200.05314.60
5.3.210.0270.07314.82
5.3.200.0300.06314.56
5.3.190.0230.04714.60
5.3.180.0230.05314.61
5.3.170.0270.04714.64
5.3.160.0270.05014.61
5.3.150.0170.06014.80
5.3.140.0230.05014.61
5.3.130.0270.05014.60
5.3.120.0200.06314.56
5.3.110.0230.05314.67
5.3.100.0300.04314.09
5.3.90.0330.04014.24
5.3.80.0270.04714.03
5.3.70.0170.05714.07
5.3.60.0200.05014.14
5.3.50.0200.05013.96
5.3.40.0200.05314.04
5.3.30.0200.05014.02
5.3.20.0230.04313.74
5.3.10.0270.06713.78
5.3.00.0230.04713.88
5.2.170.0230.03711.06
5.2.160.0170.04011.21
5.2.150.0170.04011.30
5.2.140.0200.04011.18
5.2.130.0100.04311.23
5.2.120.0100.04311.14
5.2.110.0100.04311.09
5.2.100.0200.03711.16
5.2.90.0230.03711.16
5.2.80.0170.04311.25
5.2.70.0200.03711.09
5.2.60.0170.04011.09
5.2.50.0230.03710.97
5.2.40.0200.03311.02
5.2.30.0130.04010.88
5.2.20.0170.03711.12
5.2.10.0100.04310.85
5.2.00.0270.04310.79
5.1.60.0130.03310.01
5.1.50.0300.03310.09
5.1.40.0200.02710.01
5.1.30.0100.03710.43
5.1.20.0170.03310.48
5.1.10.0200.03010.09
5.1.00.0170.03310.12
5.0.50.0030.0338.59
5.0.40.0170.0208.43
5.0.30.0070.0438.25
5.0.20.0100.0278.21
5.0.10.0070.0308.25
5.0.00.0070.0438.23
4.4.90.0030.0235.91
4.4.80.0070.0205.89
4.4.70.0030.0275.89
4.4.60.0000.0335.90
4.4.50.0030.0235.88
4.4.40.0030.0375.86
4.4.30.0070.0205.86
4.4.20.0070.0205.96
4.4.10.0100.0205.93
4.4.00.0170.0305.98
4.3.110.0100.0205.83
4.3.100.0030.0235.82
4.3.90.0070.0205.91
4.3.80.0100.0305.81
4.3.70.0130.0175.86
4.3.60.0130.0175.87
4.3.50.0000.0275.76
4.3.40.0100.0335.79
4.3.30.0030.0234.56
4.3.20.0030.0204.55
4.3.10.0100.0174.58
4.3.00.0170.0207.18

preferences:
45.76 ms | 401 KiB | 5 Q