3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Controller { public function __construct(B $b) { $this->b = $b; } } class B { public function __construct(C $c) { $this->c = $c; } } class C { public function __construct(Guzzle $guzzle) { $this->guzzle = $guzzle; } } class Guzzle { public function __construct() { } } $getReflectedConstructorParams = function($className) { return (new ReflectionClass($className))->getConstructor()->getParameters(); }; $className = 'Controller'; $graph = []; // I hate recursion, there's much better ways while (true) { $params = $getReflectedConstructorParams($className); // Guard clause if (!isset($params[0])) { // We'll have reached the Guzzle object here, the last one in the chain $prevObj = null; foreach ($graph as $obj) { // This will only happen once if ($prevObj === null) { $prevObj = new $obj; continue; } $prevObj = new $obj($prevObj); var_dump($prevObj); die; } var_dump($prevObj); break; } $className = $params[0]->getClass()->getName(); $graph[] = $className; } var_dump($graph);

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.00417.00
8.3.50.0100.00821.28
8.3.40.0070.00718.79
8.3.30.0040.01118.97
8.3.20.0090.00020.39
8.3.10.0050.00323.48
8.3.00.0000.00819.79
8.2.180.0110.01118.18
8.2.170.0070.00722.96
8.2.160.0040.01120.27
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00417.75
8.2.110.0000.01122.30
8.2.100.0070.00317.93
8.2.90.0040.00419.39
8.2.80.0060.00317.97
8.2.70.0030.00517.63
8.2.60.0000.00918.05
8.2.50.0000.00818.07
8.2.40.0050.00321.25
8.2.30.0000.00720.51
8.2.20.0000.00817.73
8.2.10.0040.00418.14
8.2.00.0040.00418.05
8.1.280.0110.00425.92
8.1.270.0090.00923.83
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00922.53
8.1.230.0070.00417.79
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0030.00517.36
8.1.180.0040.00418.10
8.1.170.0080.00020.32
8.1.160.0040.00421.97
8.1.150.0070.00018.80
8.1.140.0030.00519.62
8.1.130.0040.00417.77
8.1.120.0020.00517.39
8.1.110.0030.00717.40
8.1.100.0040.00417.37
8.1.90.0000.00717.47
8.1.80.0000.00817.34
8.1.70.0030.00517.46
8.1.60.0060.00317.63
8.1.50.0050.00317.57
8.1.40.0000.00817.58
8.1.30.0030.00517.57
8.1.20.0000.00917.57
8.1.10.0000.00817.46
8.1.00.0040.00417.45
8.0.300.0080.00018.77
8.0.290.0000.00816.88
8.0.280.0080.00018.39
8.0.270.0070.00017.30
8.0.260.0000.00717.33
8.0.250.0070.00017.03
8.0.240.0070.00017.05
8.0.230.0000.00716.91
8.0.220.0070.00016.95
8.0.210.0040.00416.96
8.0.200.0030.00316.93
8.0.190.0030.00716.99
8.0.180.0040.00416.92
8.0.170.0040.00417.00
8.0.160.0000.00716.96
8.0.150.0030.00316.80
8.0.140.0030.00316.88
8.0.130.0000.00613.41
8.0.120.0040.00416.92
8.0.110.0030.00516.90
8.0.100.0060.00316.93
8.0.90.0000.00916.75
8.0.80.0030.01216.95
8.0.70.0050.00216.96
8.0.60.0050.00217.04
8.0.50.0000.00817.00
8.0.30.0070.01217.05
8.0.20.0110.00817.40
8.0.10.0030.00516.96
8.0.00.0060.01216.83
7.4.330.0000.00515.08
7.4.320.0000.00716.53
7.4.300.0000.00716.61
7.4.290.0030.00316.52
7.4.280.0030.00316.61
7.4.270.0040.00416.53
7.4.260.0040.00416.57
7.4.250.0040.00416.55
7.4.240.0050.00216.56
7.4.230.0070.00016.68
7.4.220.0090.01316.38
7.4.210.0100.00316.69
7.4.200.0080.00016.43
7.4.160.0060.00916.66
7.4.150.0070.01017.40
7.4.140.0110.01417.86
7.4.130.0110.01116.56
7.4.120.0150.00116.66
7.4.110.0120.00916.58
7.4.100.0140.00416.74
7.4.90.0090.00916.63
7.4.80.0140.01119.39
7.4.70.0060.00916.57
7.4.60.0100.00616.55
7.4.50.0040.00416.20
7.4.40.0110.00716.54
7.4.30.0070.01416.62
7.4.00.0110.00415.02
7.3.330.0000.00513.26
7.3.320.0000.00613.38
7.3.310.0000.00716.32
7.3.300.0030.00316.44
7.3.290.0040.01316.42
7.3.280.0050.01216.43
7.3.270.0100.00617.40
7.3.260.0150.00316.32
7.3.250.0110.00816.42
7.3.240.0090.00916.46
7.3.230.0080.00816.53
7.3.210.0090.00916.50
7.3.200.0110.01016.42
7.3.190.0150.00616.34
7.3.180.0100.00716.61
7.3.170.0120.00316.67
7.3.160.0060.01016.40
7.2.330.0160.00316.71
7.2.320.0090.01316.58
7.2.310.0090.00916.81
7.2.300.0000.01716.57
7.2.290.0130.00416.52
7.2.60.0070.00717.01
7.2.00.0060.00619.51
7.1.200.0040.00415.72
7.1.100.0060.00617.95
7.1.70.0100.00817.04
7.1.60.0140.01119.50
7.1.50.0120.01016.91
7.1.00.0070.07322.40
7.0.200.0000.00916.54
7.0.60.0130.07720.04
7.0.50.0100.06717.88
7.0.40.0130.08020.27
7.0.30.0200.04020.23
7.0.20.0200.08720.18
7.0.10.0070.04020.22
7.0.00.0100.04720.14
5.6.210.0070.03720.54
5.6.200.0030.05018.19
5.6.190.0100.08720.53
5.6.180.0330.07720.62
5.6.170.0230.06320.53
5.6.160.0070.07020.54
5.6.150.0100.08018.19
5.6.140.0070.06318.18
5.6.130.0070.06018.16
5.6.120.0030.05320.88
5.6.110.0130.06720.98
5.6.100.0100.08320.92
5.6.90.0030.04321.13
5.6.80.0070.08020.34
5.5.350.0000.08320.39
5.5.340.0000.04717.98
5.5.330.0200.06720.57
5.5.320.3900.04720.34
5.5.310.0200.04320.43
5.5.300.0130.05017.95
5.5.290.0070.04017.93
5.5.280.0030.08020.79
5.5.270.0070.05320.95
5.5.260.0130.05720.89
5.5.250.0070.04720.71
5.5.240.0000.08020.29
5.4.450.0970.07319.20
5.4.440.0870.06319.58
5.4.430.0730.06319.58
5.4.420.1000.06319.60
5.4.410.0900.05719.35
5.4.400.0830.05319.12
5.4.390.0900.05018.84
5.4.380.0830.05719.17
5.4.370.0770.06019.01
5.4.360.0800.06719.31
5.4.350.0900.05719.31
5.4.340.0770.06319.14
5.4.320.1000.07319.29
5.4.310.0900.06318.87
5.4.300.0930.05018.86
5.4.290.0900.06019.22
5.4.280.0930.05319.06
5.4.270.0870.05319.38
5.4.260.0930.05718.96
5.4.250.0830.06019.14
5.4.240.0870.06019.22
5.4.230.0770.05319.28
5.4.220.0930.05319.25
5.4.210.0900.05319.30
5.4.200.1000.05319.29
5.4.190.0900.04318.83
5.4.180.0800.06719.36
5.4.170.0870.05319.24
5.4.160.1000.04718.99
5.4.150.0800.06019.11
5.4.140.0830.05716.61
5.4.130.0770.06016.38
5.4.120.0930.08016.58
5.4.110.0900.07016.67
5.4.100.0930.06016.30
5.4.90.0930.06016.48
5.4.80.0930.06316.61
5.4.70.1170.06016.47
5.4.60.1030.07316.18
5.4.50.1000.05316.17
5.4.40.0870.05716.38
5.4.30.0970.05716.59
5.4.20.0830.06316.25
5.4.10.0930.05716.59
5.4.00.0830.07015.86

preferences:
47.79 ms | 401 KiB | 5 Q