3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', '1'); error_reporting(E_ALL); class _Parent { private $name = 'Parent'; public function doSomething() { return $this->name; } } class Child extends _Parent { private $name = 'Child'; public function doSomething() { return $this->name; } } class GrandChild extends Child { private $name = 'GrandChild'; public function doSomething() { return _Parent::doSomething() . ' from ' . $this->name; } } $parent = new _Parent(); $child = new Child(); $grandChild = new GrandChild(); echo $parent->doSomething() . PHP_EOL; echo $child->doSomething() . PHP_EOL; echo $grandChild->doSomething() . 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.70.0180.00318.31
8.3.60.0110.00416.63
8.3.50.0170.00321.14
8.3.40.0030.01318.89
8.3.30.0070.00718.75
8.3.20.0040.00419.15
8.3.10.0040.00421.94
8.3.00.0000.00719.21
8.2.190.0110.01116.63
8.2.180.0040.01116.75
8.2.170.0150.00018.76
8.2.160.0070.00720.36
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0000.00819.71
8.2.120.0080.00026.35
8.2.110.0040.00721.00
8.2.100.0100.00318.09
8.2.90.0000.00817.61
8.2.80.0030.00617.97
8.2.70.0000.00817.80
8.2.60.0030.00617.97
8.2.50.0060.00318.10
8.2.40.0040.00420.43
8.2.30.0040.00419.25
8.2.20.0000.00818.05
8.2.10.0040.00418.10
8.2.00.0040.00417.69
8.1.280.0090.01625.92
8.1.270.0080.00022.02
8.1.260.0080.00028.09
8.1.250.0050.00328.09
8.1.240.0030.00722.08
8.1.230.0080.00420.81
8.1.220.0030.00617.74
8.1.210.0090.00018.77
8.1.200.0050.00517.22
8.1.190.0030.00617.23
8.1.180.0070.00018.10
8.1.170.0040.00418.56
8.1.160.0040.00419.02
8.1.150.0000.00720.27
8.1.140.0000.00719.59
8.1.130.0000.00717.46
8.1.120.0040.00417.46
8.1.110.0040.00417.43
8.1.100.0000.00817.47
8.1.90.0000.00717.45
8.1.80.0040.00417.53
8.1.70.0030.00317.48
8.1.60.0000.00717.48
8.1.50.0050.00317.63
8.1.40.0040.00417.50
8.1.30.0040.00417.63
8.1.20.0030.00717.64
8.1.10.0060.00317.56
8.1.00.0080.00017.50
8.0.300.0040.00418.77
8.0.290.0000.00916.63
8.0.280.0000.00718.47
8.0.270.0000.00717.27
8.0.260.0040.00416.83
8.0.250.0030.00616.86
8.0.240.0000.00616.99
8.0.230.0040.00416.84
8.0.220.0070.00016.91
8.0.210.0080.00016.95
8.0.200.0000.00616.95
8.0.190.0040.00416.83
8.0.180.0000.00716.94
8.0.170.0040.00416.89
8.0.160.0050.00316.99
8.0.150.0030.00916.77
8.0.140.0030.00516.84
8.0.130.0030.00313.27
8.0.120.0030.00516.88
8.0.110.0000.00717.02
8.0.100.0040.00416.97
8.0.90.0040.00416.80
8.0.80.0060.00916.85
8.0.70.0040.00416.85
8.0.60.0070.00016.89
8.0.50.0000.00716.89
8.0.30.0120.00617.10
8.0.20.0090.01117.40
8.0.10.0000.00816.77
8.0.00.0120.00616.77
7.4.330.0050.00015.55
7.4.320.0000.00616.54
7.4.300.0040.00416.61
7.4.290.0000.00716.45
7.4.280.0070.00416.63
7.4.270.0000.00716.55
7.4.260.0030.00316.50
7.4.250.0070.00016.56
7.4.240.0030.00516.63
7.4.230.0070.00016.70
7.4.220.0110.00716.55
7.4.210.0040.01216.50
7.4.200.0070.00016.55
7.4.160.0110.01016.39
7.4.150.0090.00917.40
7.4.140.0120.00617.86
7.4.130.0080.01116.60
7.4.120.0080.01116.49
7.4.110.0370.00916.52
7.4.100.0090.00616.46
7.4.90.0110.00816.46
7.4.80.0080.00819.39
7.4.70.0120.00916.47
7.4.60.0130.00416.60
7.4.50.0060.00916.64
7.4.40.0130.00616.50
7.4.30.0060.01016.46
7.4.00.0060.00615.14
7.3.330.0060.00013.18
7.3.320.0000.00513.31
7.3.310.0040.00416.35
7.3.300.0000.00716.28
7.3.290.0030.01316.35
7.3.280.0060.01016.32
7.3.270.0120.00617.40
7.3.260.0110.00616.62
7.3.250.0100.00816.44
7.3.240.0100.00816.40
7.3.230.0070.01116.39
7.3.210.0070.01016.24
7.3.200.0100.01016.62
7.3.190.0030.01316.24
7.3.180.0090.00616.24
7.3.170.0030.01916.60
7.3.160.0100.00716.35
7.2.330.0080.01116.65
7.2.320.0170.00716.70
7.2.310.0110.01116.77
7.2.300.0090.00916.75
7.2.290.0120.00916.78
7.1.70.0000.01216.79
7.1.60.0030.01017.19
7.1.00.0070.07322.36
7.0.200.0210.01014.66
7.0.130.0130.06022.02
7.0.120.0100.05722.00
7.0.110.0030.06322.07
7.0.100.0100.06022.00
7.0.90.0030.07722.16
7.0.80.0070.05722.06
7.0.70.0130.07722.10
7.0.60.0100.06021.73
7.0.50.0030.07722.14
7.0.40.0230.06022.07
7.0.30.0100.05321.98
7.0.20.0100.05322.10
7.0.10.0070.06022.13
7.0.00.0130.06722.15
5.6.280.0130.06721.05
5.6.270.0100.06720.85
5.6.260.0100.05721.14
5.6.250.0070.05721.14
5.6.240.0030.06021.04
5.6.230.0070.05720.75
5.6.220.0170.07020.86
5.6.210.0000.07320.89
5.6.200.0070.07720.86
5.6.190.0130.07720.88
5.6.180.0170.05721.05
5.6.170.0100.05720.84
5.6.160.0000.06320.77
5.6.150.0130.06720.84
5.6.140.0030.06720.89
5.6.130.0070.07020.93
5.6.120.0070.06020.79
5.6.110.0000.06321.06
5.6.100.0130.05720.86
5.6.90.0100.06320.84
5.6.80.0000.08320.40
5.6.70.0000.07720.19
5.6.60.0100.06720.42
5.6.50.0030.05720.36
5.6.40.0070.05320.20
5.6.30.0030.05720.17
5.6.20.0130.05320.37
5.6.10.0100.06720.29
5.6.00.0100.05020.35

preferences:
29.64 ms | 401 KiB | 5 Q