3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $protectedVariable; public function __construct() { $this->protectedVariable = 'this belongs to test class'; } } $x = new class (5) extends Test { public $holder; public function __construct($classArg) { parent::__construct(); $this->holder = $classArg; } public function multiplyByNo($multiplier) { return $this->holder * $multiplier; } public function getParentVar() { return $this->protectedVariable(); } }; var_dump($x->multiplyByNo(10)); var_dump($x->getParentVar());

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.0110.00418.84
8.3.30.0130.01018.79
8.3.20.0070.00020.07
8.3.10.0050.00323.53
8.3.00.0000.00823.70
8.2.170.0070.01422.96
8.2.160.0100.00319.22
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00819.76
8.2.120.0070.00026.35
8.2.110.0030.00622.08
8.2.100.0040.00817.84
8.2.90.0090.00017.88
8.2.80.0040.00417.97
8.2.70.0060.00317.93
8.2.60.0000.00817.93
8.2.50.0000.00818.10
8.2.40.0030.00720.59
8.2.30.0000.00719.43
8.2.20.0040.00417.76
8.2.10.0070.00018.06
8.2.00.0040.00418.06
8.1.270.0130.00620.33
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0040.00423.88
8.1.230.0040.00820.97
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0090.00317.38
8.1.190.0000.00917.25
8.1.180.0000.00818.10
8.1.170.0040.00418.55
8.1.160.0080.00020.80
8.1.150.0040.00418.89
8.1.140.0080.00019.58
8.1.130.0070.00017.71
8.1.120.0000.00717.52
8.1.110.0000.00717.41
8.1.100.0070.00017.39
8.1.90.0000.00717.45
8.1.80.0070.00017.43
8.1.70.0040.00417.48
8.1.60.0000.00817.57
8.1.50.0030.00617.43
8.1.40.0040.00417.48
8.1.30.0000.00817.67
8.1.20.0030.00517.54
8.1.10.0040.00417.57
8.1.00.0070.00017.52
8.0.300.0050.00221.59
8.0.290.0040.00416.88
8.0.280.0000.00718.45
8.0.270.0030.00317.18
8.0.260.0030.00317.19
8.0.250.0030.00317.04
8.0.240.0030.00316.90
8.0.230.0040.00416.90
8.0.220.0000.00716.85
8.0.210.0030.00316.86
8.0.200.0000.00617.00
8.0.190.0040.00416.89
8.0.180.0040.00416.97
8.0.170.0030.00517.04
8.0.160.0000.00816.91
8.0.150.0000.00716.93
8.0.140.0000.00716.96
8.0.130.0050.00013.41
8.0.120.0080.00016.95
8.0.110.0000.00716.96
8.0.100.0000.00716.90
8.0.90.0050.00216.85
8.0.80.0130.00316.87
8.0.70.0000.00716.95
8.0.60.0070.00016.92
8.0.50.0000.00817.00
8.0.30.0090.01217.13
8.0.20.0080.00917.40
8.0.10.0000.00817.05
8.0.00.0110.00817.04
7.4.330.0030.00316.75
7.4.320.0040.00416.49
7.4.300.0040.00416.60
7.4.290.0070.00016.60
7.4.280.0030.00616.52
7.4.270.0050.00216.63
7.4.260.0030.00316.47
7.4.250.0040.00416.57
7.4.240.0030.00416.57
7.4.230.0040.00416.63
7.4.220.0100.00716.53
7.4.210.0110.00716.57
7.4.200.0030.00316.51
7.4.160.0130.00416.50
7.4.150.0060.01017.40
7.4.140.0120.00717.86
7.4.130.0100.01016.48
7.4.120.0120.00616.63
7.4.110.0100.00716.57
7.4.100.0060.01516.67
7.4.90.0070.01016.53
7.4.80.0140.00319.39
7.4.70.0090.01516.53
7.4.60.0060.00916.64
7.4.50.0020.01616.47
7.4.40.0070.01016.72
7.4.30.0080.00916.71
7.4.00.0030.01414.92
7.3.330.0020.00213.37
7.3.320.0040.00413.37
7.3.310.0030.00316.40
7.3.300.0000.00716.41
7.3.290.0050.01116.40
7.3.280.0060.01016.37
7.3.270.0100.00717.40
7.3.260.0000.01716.42
7.3.250.0080.01216.53
7.3.240.0120.00916.56
7.3.230.0070.01116.47
7.3.210.0060.01116.56
7.3.200.0150.00619.39
7.3.190.0070.01316.51
7.3.180.0070.01316.55
7.3.170.0040.01216.52
7.3.160.0110.00616.46
7.2.330.0140.00716.69
7.2.320.0090.00916.50
7.2.310.0170.00716.78
7.2.300.0040.01316.85
7.2.290.0070.01016.85
7.2.60.0060.00916.98
7.2.00.0110.00419.61
7.1.200.0000.01215.68
7.1.100.0030.00918.16
7.1.70.0000.01317.04
7.1.60.0100.01419.27
7.1.50.0140.00316.58
7.1.00.0030.07722.48
7.0.200.0030.00716.55
7.0.60.0100.05721.66
7.0.50.0130.06317.91
7.0.40.0030.04319.96
7.0.30.0330.06320.26
7.0.20.0370.03320.26
7.0.10.0200.06320.07
7.0.00.0130.07020.06
5.6.280.0000.04020.86
5.6.210.0070.07020.61
5.6.200.0070.08718.29
5.6.190.0000.09020.64
5.6.180.0500.06720.42
5.6.170.0370.06720.48
5.6.160.0170.07720.41
5.6.150.0030.07018.14
5.6.140.0070.08318.16
5.6.130.0030.04018.17
5.6.120.0000.07721.02
5.6.110.0070.08020.96
5.6.100.0070.04021.04
5.6.90.0070.08321.08
5.6.80.0070.03720.43
5.5.350.0000.08720.41
5.5.340.0030.06717.92
5.5.330.0100.03720.26
5.5.320.0600.07020.29
5.5.310.0300.04720.27
5.5.300.0100.06318.01
5.5.290.0100.08717.98
5.5.280.0130.07720.87
5.5.270.0030.07720.86
5.5.260.0130.07320.84
5.5.250.0170.03020.55
5.5.240.0200.06320.27

preferences:
41.59 ms | 400 KiB | 5 Q