3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { protected $quadrat; public function getQuadrat() { echo is_callable($this->quadrat) ? 'Yes' : 'No'; echo "\n"; return $this->quadrat; } } class Test extends Base { public function malzwei($n) { return $n * 2; } public function quadrat($n) { return $n * $n; } } $t = new Test(); echo call_user_func($t->getQuadrat(), 3); var_dump(array_map($t->getQuadrat(), array(1, 2, 3, 4)));

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.0150.00018.43
8.3.60.0110.00718.65
8.3.50.0080.01021.07
8.3.40.0070.01018.67
8.3.30.0140.00020.39
8.3.20.0040.00420.38
8.3.10.0040.00422.04
8.3.00.0040.00422.57
8.2.190.0070.00716.58
8.2.180.0120.00616.75
8.2.170.0120.00322.96
8.2.160.0130.00020.38
8.2.150.0030.00524.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0060.00319.54
8.2.110.0090.00022.13
8.2.100.0060.00619.25
8.2.90.0030.00619.05
8.2.80.0030.00519.23
8.2.70.0060.00317.63
8.2.60.0040.00417.92
8.2.50.0040.00418.07
8.2.40.0040.00418.34
8.2.30.0080.00018.07
8.2.20.0000.00817.70
8.2.10.0000.00817.60
8.2.00.0040.00417.67
8.1.280.0120.00625.92
8.1.270.0040.00424.66
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00023.83
8.1.230.0030.00819.16
8.1.220.0000.00717.79
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0030.00617.52
8.1.180.0000.00819.93
8.1.170.0040.00418.59
8.1.160.0040.00422.19
8.1.150.0070.00018.62
8.1.140.0000.00817.41
8.1.130.0080.00017.83
8.1.120.0070.00017.46
8.1.110.0040.00417.36
8.1.100.0050.00317.44
8.1.90.0050.00217.32
8.1.80.0000.00817.45
8.1.70.0070.00017.32
8.1.60.0030.00617.59
8.1.50.0030.00617.35
8.1.40.0030.00517.54
8.1.30.0040.00417.65
8.1.20.0000.00817.51
8.1.10.0000.00717.55
8.1.00.0030.00617.41
8.0.300.0000.00719.09
8.0.290.0000.00717.18
8.0.280.0040.00418.45
8.0.270.0000.00717.23
8.0.260.0030.00318.46
8.0.250.0000.00716.91
8.0.240.0080.00416.95
8.0.230.0030.00316.98
8.0.220.0060.00316.93
8.0.210.0030.00516.89
8.0.200.0070.00016.92
8.0.190.0000.00816.98
8.0.180.0080.00016.82
8.0.170.0000.00816.85
8.0.160.0080.00016.91
8.0.150.0000.00716.70
8.0.140.0040.00416.78
8.0.130.0000.00513.35
8.0.120.0000.00816.71
8.0.110.0040.00416.89
8.0.100.0030.00516.76
8.0.90.0030.00516.75
8.0.80.0110.00416.86
8.0.70.0040.00416.91
8.0.60.0070.00016.84
8.0.50.0050.00216.93
8.0.30.0130.00817.04
8.0.20.0080.01017.40
8.0.10.0000.00816.96
8.0.00.0150.00316.70
7.4.330.0060.00015.00
7.4.320.0000.00616.35
7.4.300.0000.00716.46
7.4.290.0030.00416.41
7.4.280.0000.00716.50
7.4.270.0000.00616.53
7.4.260.0000.00716.42
7.4.250.0040.00416.46
7.4.240.0000.00716.56
7.4.230.0030.00316.36
7.4.220.0100.01416.57
7.4.210.0060.00816.59
7.4.200.0000.00716.38
7.4.190.0000.00716.75
7.4.160.0030.01216.49
7.4.150.0130.00417.40
7.4.140.0120.01017.86
7.4.130.0060.01416.55
7.4.120.0100.00716.43
7.4.110.0070.01016.64
7.4.100.0170.00716.45
7.4.90.0070.01116.45
7.4.80.0090.01219.39
7.4.70.0070.01016.51
7.4.60.0060.00916.49
7.4.50.0000.00816.44
7.4.40.0120.00322.77
7.4.30.0060.01616.52
7.4.00.0070.01114.89
7.3.330.0060.00013.16
7.3.320.0000.00613.31
7.3.310.0000.00816.16
7.3.300.0030.00316.34
7.3.290.0140.00016.31
7.3.280.0050.01116.27
7.3.270.0080.01117.40
7.3.260.0110.00616.23
7.3.250.0100.00816.22
7.3.240.0060.01216.39
7.3.230.0070.01116.39
7.3.210.0140.00316.50
7.3.200.0090.00919.39
7.3.190.0040.01916.52
7.3.180.0090.00616.41
7.3.170.0030.01316.55
7.3.160.0130.01016.23
7.3.120.0070.00714.95
7.2.330.0090.00916.64
7.2.320.0120.00916.61
7.2.310.0130.00916.58
7.2.300.0040.01216.48
7.2.290.0120.00416.74
7.2.60.0080.00317.04
7.2.00.0070.01019.55
7.1.200.0030.01015.80
7.1.100.0090.00318.21
7.1.70.0040.00417.16
7.1.60.0070.01719.21
7.1.50.0090.00934.62
7.1.00.0030.03322.40
7.0.200.0040.01116.54
7.0.140.0030.06721.99
7.0.60.0200.08719.93
7.0.50.0000.06017.88
7.0.40.0130.04720.40
7.0.30.0300.07720.26
7.0.20.0200.08020.09
7.0.10.0100.07020.26
7.0.00.0070.06020.11
5.6.280.0100.06721.05
5.6.210.0000.05320.73
5.6.200.0030.04018.20
5.6.190.0130.08020.61
5.6.180.3170.04020.47
5.6.170.0200.03720.57
5.6.160.0170.06720.54
5.6.150.0070.08018.18
5.6.140.0100.04318.27
5.6.130.0000.04318.15
5.6.120.0170.07321.14
5.6.110.0170.07021.03
5.6.100.0100.07321.10
5.6.90.0130.06020.96
5.6.80.0000.05020.43
5.5.350.0000.07320.50
5.5.340.0000.08317.98
5.5.330.0170.05020.29
5.5.320.0230.04320.38
5.5.310.0170.04720.27
5.5.300.0070.06017.92
5.5.290.0070.08318.00
5.5.280.0100.07720.86
5.5.270.0030.06720.66
5.5.260.0130.07720.89
5.5.250.0070.03720.79
5.5.240.0130.03720.16
5.4.450.0170.06319.58
5.4.440.0770.06319.70
5.4.430.0800.05719.58
5.4.420.0600.05719.48
5.4.410.0770.05319.48
5.4.400.0900.06019.08
5.4.390.0900.06019.29
5.4.380.0200.05718.75
5.4.370.0170.05018.76
5.4.360.0200.04318.74
5.4.350.0110.05412.02
5.4.340.0090.03612.02
5.4.320.0120.04712.51
5.4.310.0070.03812.50
5.4.300.0030.04012.50
5.4.290.0040.04012.50
5.4.280.0080.03312.40
5.4.270.0050.04912.40
5.4.260.0080.05212.39
5.4.250.0130.07318.92
5.4.240.0070.06018.74
5.4.230.0070.08018.97
5.4.220.0030.08018.86
5.4.210.0030.08318.95
5.4.200.0170.05318.93
5.4.190.0230.05318.95
5.4.180.0100.05318.70
5.4.170.0030.06018.86
5.4.160.0100.06318.75
5.4.150.0100.07719.05
5.4.140.0170.06316.61
5.4.130.0030.05316.62
5.4.120.0170.06316.52
5.4.110.0230.04316.37
5.4.100.0070.07016.63
5.4.90.0100.05016.59
5.4.80.0030.05016.50
5.4.70.0100.04716.48
5.4.60.0230.06016.50
5.4.50.0200.06016.35
5.4.40.0130.05716.61
5.4.30.0170.04716.42
5.4.20.0100.05016.29
5.4.10.0070.05716.50
5.4.00.0130.04716.04
5.3.290.0070.03912.80
5.3.280.0070.05314.82
5.3.270.0170.04714.61
5.3.260.0100.05314.79
5.3.250.0130.04714.83
5.3.240.0000.06014.75
5.3.230.0100.07314.67
5.3.220.0170.07314.66
5.3.210.0130.05014.58
5.3.200.0030.05714.66
5.3.190.0170.06314.65
5.3.180.0000.06014.73
5.3.170.0030.05314.40
5.3.160.0170.06014.57
5.3.150.0130.04714.71
5.3.140.0070.05314.78
5.3.130.0130.07014.54
5.3.120.0070.05314.73
5.3.110.0000.06314.54
5.3.100.0070.07314.06
5.3.90.0100.04714.16
5.3.80.0030.05314.10
5.3.70.0000.05714.10
5.3.60.0000.05314.07
5.3.50.0100.05014.12
5.3.40.0030.05713.80
5.3.30.0030.06013.90
5.3.20.0130.04013.61
5.3.10.0070.06713.62
5.3.00.0100.05313.66
5.2.170.0000.04711.22
5.2.160.0100.04711.13
5.2.150.0070.03711.14
5.2.140.0100.03711.36
5.2.130.0130.03311.18
5.2.120.0100.03711.18
5.2.110.0030.06011.01
5.2.100.0130.03711.09
5.2.90.0130.05011.09
5.2.80.0130.05011.17
5.2.70.0070.04311.18
5.2.60.0100.04311.15
5.2.50.0100.03710.85
5.2.40.0000.06311.07
5.2.30.0030.04710.96
5.2.20.0030.05310.87
5.2.10.0070.05010.86
5.2.00.0070.05010.71
5.1.60.0070.04310.06
5.1.50.0000.0379.92
5.1.40.0070.0479.91
5.1.30.0030.03710.34
5.1.20.0030.03710.43
5.1.10.0030.05010.04
5.1.00.0030.0409.99
5.0.50.0000.0378.39
5.0.40.0000.0308.38
5.0.30.0070.0478.21
5.0.20.0070.0238.18
5.0.10.0000.0278.15
5.0.00.0030.0408.14
4.4.90.0030.0337.42
4.4.80.0100.0237.42
4.4.70.0030.0277.42
4.4.60.0100.0207.42
4.4.50.0000.0277.42
4.4.40.0030.0307.42
4.4.30.0070.0177.42
4.4.20.0000.0237.42
4.4.10.0030.0207.42
4.4.00.0000.0337.42
4.3.110.0000.0277.42
4.3.100.0000.0207.42
4.3.90.0000.0307.42
4.3.80.0030.0307.42
4.3.70.0070.0237.42
4.3.60.0030.0237.42
4.3.50.0030.0237.42
4.3.40.0030.0307.42
4.3.30.0000.0237.42
4.3.20.0030.0307.42
4.3.10.0000.0307.42
4.3.00.0070.0208.10

preferences:
38.81 ms | 401 KiB | 5 Q