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 (10) extends Test { public $holder; public $publicVar; public function __construct($classArg) { parent::__construct(); $this->holder = $classArg; } public function multiplyByNo($multiplier) { return $this->holder * $multiplier; } }; $templateFunction = function ($someNumber) { return $this->multiplyByNo($someNumber); }; var_dump($x->call($templateFunction, 10));

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.0090.01218.55
8.3.50.0140.00521.11
8.3.40.0150.00018.98
8.3.30.0140.00318.79
8.3.20.0000.00720.20
8.3.10.0080.00021.73
8.3.00.0040.00423.66
8.2.180.0080.00816.75
8.2.170.0110.01122.96
8.2.160.0130.00020.40
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00818.89
8.2.110.0100.00022.11
8.2.100.0060.00617.93
8.2.90.0000.00819.08
8.2.80.0040.00418.03
8.2.70.0030.00617.75
8.2.60.0060.00318.04
8.2.50.0000.00818.07
8.2.40.0060.00320.60
8.2.30.0000.00819.32
8.2.20.0050.00217.81
8.2.10.0000.00818.11
8.2.00.0070.00018.05
8.1.280.0090.00625.92
8.1.270.0000.00820.23
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0060.00323.86
8.1.230.0080.00619.15
8.1.220.0080.00017.78
8.1.210.0030.00918.77
8.1.200.0040.00417.35
8.1.190.0030.00517.35
8.1.180.0070.00018.10
8.1.170.0060.00318.64
8.1.160.0040.00420.64
8.1.150.0000.00818.89
8.1.140.0080.00019.56
8.1.130.0040.00417.71
8.1.120.0040.00317.42
8.1.110.0050.00217.49
8.1.100.0040.00417.41
8.1.90.0000.00817.52
8.1.80.0080.00017.36
8.1.70.0000.00717.38
8.1.60.0000.00817.48
8.1.50.0000.00817.58
8.1.40.0060.00317.43
8.1.30.0040.00417.55
8.1.20.0000.00717.66
8.1.10.0030.00617.54
8.1.00.0040.00417.59
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0080.00018.44
8.0.270.0040.00417.21
8.0.260.0060.00017.25
8.0.250.0070.00016.96
8.0.240.0030.00316.89
8.0.230.0000.00716.99
8.0.220.0000.00716.88
8.0.210.0000.00816.97
8.0.200.0000.00717.07
8.0.190.0050.00316.89
8.0.180.0040.00416.98
8.0.170.0050.00316.98
8.0.160.0070.00016.95
8.0.150.0050.00316.95
8.0.140.0040.00416.89
8.0.130.0030.00313.38
8.0.120.0000.00816.84
8.0.110.0030.00316.87
8.0.100.0040.00416.89
8.0.90.0050.00216.82
8.0.80.0090.01316.84
8.0.70.0040.00416.84
8.0.60.0000.00716.79
8.0.50.0000.00716.80
8.0.30.0150.00616.93
8.0.20.0110.00917.40
8.0.10.0030.00517.10
8.0.00.0140.00716.89
7.4.330.0060.00016.71
7.4.320.0030.00316.41
7.4.300.0000.00716.61
7.4.290.0030.00316.39
7.4.280.0000.00816.41
7.4.270.0000.00716.64
7.4.260.0040.00416.49
7.4.250.0040.00416.61
7.4.240.0020.00516.54
7.4.230.0000.00716.39
7.4.220.0060.01016.54
7.4.210.0120.00916.45
7.4.200.0030.00316.60
7.4.160.0000.01616.41
7.4.150.0180.00917.40
7.4.140.0140.00517.86
7.4.130.0090.01316.77
7.4.120.0110.00716.61
7.4.110.0060.01016.70
7.4.100.0060.01216.45
7.4.90.0060.01616.50
7.4.80.0130.00319.39
7.4.70.0040.01616.73
7.4.60.0140.00316.61
7.4.50.0090.00516.26
7.4.40.0110.00516.44
7.4.30.0090.00916.59
7.4.00.0070.00715.07
7.3.330.0000.00513.16
7.3.320.0050.00013.30
7.3.310.0000.00716.38
7.3.300.0040.00416.42
7.3.290.0060.00916.34
7.3.280.0030.01316.35
7.3.270.0000.01717.40
7.3.260.0070.01116.39
7.3.240.0150.00516.42
7.3.230.0170.00316.45
7.3.210.0060.01616.38
7.3.200.0120.00919.39
7.3.190.0070.01016.42
7.3.180.0090.01216.58
7.3.170.0130.00316.38
7.3.160.0060.01016.44
7.3.10.0100.01016.43
7.3.00.0060.00916.63
7.2.330.0070.01116.71
7.2.320.0060.01216.70
7.2.310.0120.00416.71
7.2.300.0130.00316.68
7.2.290.0120.00916.48
7.2.130.0120.00916.98
7.2.120.0070.01116.66
7.2.110.0060.01016.86
7.2.100.0090.00717.01
7.2.90.0040.01316.87
7.2.80.0060.01316.93
7.2.70.0100.00416.68
7.2.60.0130.00316.67
7.2.50.0080.00816.69
7.2.40.0060.00816.96
7.2.30.0130.00516.74
7.2.20.0100.00716.73
7.2.10.0120.01016.87
7.2.00.0090.00816.99
7.1.250.0110.00815.72
7.1.240.0030.01315.90
7.1.230.0130.00915.66
7.1.220.0120.01215.77
7.1.210.0100.01015.79
7.1.200.0100.00815.54
7.1.190.0150.00415.43
7.1.180.0120.00615.39
7.1.170.0130.00315.60
7.1.160.0060.01515.70
7.1.150.0090.00915.78
7.1.140.0120.01215.58
7.1.130.0030.01615.59
7.1.120.0160.00415.39
7.1.110.0240.00615.94
7.1.100.0080.01116.80
7.1.90.0130.00315.40
7.1.80.0000.01315.87
7.1.70.0050.00316.50
7.1.60.0110.00817.36
7.1.50.0070.01016.24
7.1.40.0060.00315.65
7.1.30.0000.01215.57
7.1.20.0030.01015.14
7.1.10.0140.00315.58
7.1.00.0070.03719.01
7.0.330.0080.00515.19
7.0.320.0100.01015.36
7.0.310.0140.00315.33
7.0.300.0100.00315.39
7.0.290.0140.00315.21
7.0.280.0180.00315.13
7.0.270.0070.01015.30
7.0.260.0090.01015.18
7.0.250.0100.00715.12
7.0.240.0130.00615.36
7.0.230.0070.00715.42
7.0.220.0130.00015.16
7.0.210.0070.00714.87
7.0.200.0020.00815.96
7.0.190.0000.01115.26
7.0.180.0060.00615.34
7.0.170.0060.00615.25
7.0.160.0070.00415.06
7.0.150.0060.00615.29
7.0.140.0070.01015.25
7.0.130.0030.00615.45
7.0.120.0000.00815.12
7.0.110.0060.00315.08
7.0.100.0060.00914.94
7.0.90.0060.00315.33
7.0.80.0070.00715.42
7.0.70.0070.00715.12
7.0.60.0100.02118.59
7.0.50.0070.04416.52
7.0.40.0020.03916.54
7.0.30.0230.04016.67
7.0.20.0200.03816.81
7.0.10.0050.03616.86
7.0.00.0020.02816.71
5.6.380.0080.01113.88
5.6.370.0030.01413.85
5.6.360.0070.00714.20
5.6.350.0070.00714.19
5.6.340.0080.00814.05
5.6.330.0000.01313.93
5.6.320.0060.00614.24
5.6.310.0040.01114.11
5.6.300.0080.00313.92
5.6.290.0110.00413.92
5.6.280.0060.01917.50
5.6.270.0000.01414.25
5.6.260.0030.01014.29
5.6.250.0000.01313.92
5.6.240.0120.00014.14
5.6.230.0070.00713.87
5.6.220.0040.00413.85
5.6.210.0040.03417.28
5.6.200.0020.04816.05
5.6.190.0060.03617.25
5.6.180.0190.02417.17
5.6.170.0250.04017.28
5.6.160.0070.02517.16
5.6.150.0110.02516.04
5.6.140.0040.03916.03
5.6.130.0030.02315.93
5.6.120.0020.03817.45
5.6.110.0030.03717.40
5.6.100.0040.02317.43
5.6.90.0100.04417.49
5.6.80.0020.02717.29
5.6.70.0030.00713.75
5.6.60.0000.01413.70
5.6.50.0000.01414.06
5.6.40.0070.01013.96
5.6.30.0030.01014.06
5.6.20.0070.00713.80
5.6.10.0110.00413.75
5.6.00.0000.01213.86
5.5.380.0030.00310.75
5.5.370.0030.00610.99
5.5.360.0000.01110.78
5.5.350.0050.04215.63
5.5.340.0080.04114.36
5.5.330.0050.02115.51
5.5.320.0270.03615.59
5.5.310.0160.03215.61
5.5.300.0080.04214.34
5.5.290.0080.04114.50
5.5.280.0060.04315.71
5.5.270.0080.02815.79
5.5.260.0090.04015.67
5.5.250.0020.02315.77
5.5.240.0090.02215.50
5.5.230.0060.00310.63
5.5.220.0000.00610.66
5.5.210.0070.00410.93
5.5.200.0030.00310.90
5.5.190.0000.00810.91
5.5.180.0030.00311.03
5.5.170.0100.00310.78
5.5.160.0040.00710.80
5.5.150.0100.00310.77
5.5.140.0000.00610.84
5.5.130.0000.00810.61
5.5.120.0100.00310.84
5.5.110.0110.00010.90
5.5.100.0030.00710.43
5.5.90.0070.00410.88
5.5.80.0000.01210.59
5.5.70.0090.00010.86
5.5.60.0040.00810.63
5.5.50.0070.00310.68
5.5.40.0060.00610.59
5.5.30.0070.00310.70
5.5.20.0070.00410.96
5.5.10.0060.00610.66
5.5.00.0060.00610.72

preferences:
36.21 ms | 401 KiB | 5 Q