3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __call($name, $args) { $method = $name.'_'.join('_', array_map('gettype', $args)); //ugly, but more common: //$method = $name.'_'.md5(serialize(array_map('gettype', $args))); if(method_exists($this, $method)) { return call_user_func_array([$this, $method], $args); } } protected function foo_integer_string($x, $y) { echo('Called method implementation with 1-st (int) and 2-nd (string) parameters'.PHP_EOL); } protected function foo_integer_integer($x, $y) { echo('Called method implementation with 1-st (int) and 2-nd (int) parameters'.PHP_EOL); } } $obj=new Test(); $obj->foo(5, "bar"); $obj->foo(8, 2);

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.0080.00818.43
8.3.50.0130.00716.51
8.3.40.0090.00618.98
8.3.30.0090.00618.84
8.3.20.0040.00418.90
8.3.10.0050.00520.65
8.3.00.0030.00617.50
8.2.180.0080.00816.50
8.2.170.0080.00822.96
8.2.160.0090.00622.25
8.2.150.0060.00324.18
8.2.140.0110.00724.66
8.2.130.0050.00326.16
8.2.120.0050.00219.88
8.2.110.0070.00321.12
8.2.100.0110.00017.97
8.2.90.0060.00319.21
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0030.00617.80
8.2.50.0060.00318.07
8.2.40.0040.00418.28
8.2.30.0040.00418.20
8.2.20.0000.00817.66
8.2.10.0050.00317.59
8.2.00.0000.00817.68
8.1.280.0160.00625.92
8.1.270.0040.00423.99
8.1.260.0030.00526.35
8.1.250.0070.01128.09
8.1.240.0000.00921.31
8.1.230.0090.00317.42
8.1.220.0000.00717.74
8.1.210.0080.00018.77
8.1.200.0000.01117.35
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0060.00318.91
8.1.160.0000.00718.82
8.1.150.0000.00818.60
8.1.140.0050.00317.45
8.1.130.0030.00317.83
8.1.120.0000.00717.38
8.1.110.0000.00817.47
8.1.100.0040.00417.41
8.1.90.0000.00717.47
8.1.80.0040.00417.40
8.1.70.0040.00417.34
8.1.60.0000.00817.64
8.1.50.0000.00817.38
8.1.40.0040.00417.55
8.1.30.0040.00417.70
8.1.20.0030.00517.57
8.1.10.0040.00417.63
8.1.00.0040.00417.39
8.0.300.0050.00318.77
8.0.290.0050.00216.63
8.0.280.0040.00418.37
8.0.270.0000.00717.27
8.0.260.0000.00718.67
8.0.250.0000.00816.86
8.0.240.0100.00017.00
8.0.230.0000.00716.95
8.0.220.0000.00716.86
8.0.210.0050.00216.88
8.0.200.0000.00717.02
8.0.190.0040.00416.99
8.0.180.0030.00516.82
8.0.170.0030.00616.83
8.0.160.0050.00316.95
8.0.150.0040.00416.73
8.0.140.0060.00316.75
8.0.130.0050.00013.36
8.0.120.0000.00816.88
8.0.110.0000.00716.91
8.0.100.0020.00516.96
8.0.90.0030.00516.78
8.0.80.0120.00616.85
8.0.70.0060.00316.88
8.0.60.0000.00816.97
8.0.50.0040.00416.84
8.0.30.0090.01017.05
8.0.20.0120.00617.13
8.0.10.0050.00216.85
8.0.00.0130.01016.83
7.4.330.0000.00514.86
7.4.320.0000.00616.61
7.4.300.0050.00216.59
7.4.290.0070.00016.61
7.4.280.0050.00516.54
7.4.270.0000.00816.53
7.4.260.0030.00313.18
7.4.250.0000.00716.61
7.4.240.0040.00416.49
7.4.230.0030.00316.54
7.4.220.0160.00316.70
7.4.210.0080.00716.54
7.4.200.0030.00316.60
7.4.190.0000.00716.62
7.4.160.0140.00316.50
7.4.150.0030.01417.07
7.4.140.0140.00617.13
7.4.130.0060.01316.72
7.4.120.0080.01316.43
7.4.110.0060.01216.43
7.4.100.0040.01316.40
7.4.90.0100.00716.52
7.4.80.0120.00618.80
7.4.70.0060.01016.57
7.4.60.0130.00716.61
7.4.50.0030.00516.60
7.4.40.0030.01322.27
7.4.30.0090.01216.45
7.4.00.0090.00614.66
7.3.330.0070.00013.17
7.3.320.0030.00313.21
7.3.310.0070.00016.38
7.3.300.0040.00416.30
7.3.290.0070.00716.26
7.3.280.0080.01116.29
7.3.270.0120.00517.07
7.3.260.0090.00818.24
7.3.250.0080.01116.43
7.3.240.0100.00716.57
7.3.230.0100.00716.39
7.3.210.0100.00716.54
7.3.200.0070.01019.39
7.3.190.0170.00016.39
7.3.180.0130.00316.18
7.3.170.0120.00916.32
7.3.160.0090.00616.46
7.3.120.0080.00814.48
7.2.330.0030.01516.88
7.2.320.0100.00716.71
7.2.310.0200.00416.47
7.2.300.0100.00616.86
7.2.290.0060.00916.61
7.2.60.0040.01116.83
7.2.00.0090.00619.60
7.1.200.0060.00615.82
7.1.100.0780.01416.16
7.1.70.0040.00417.28
7.1.60.0090.01619.40
7.1.50.0040.01816.87
7.1.00.0030.07722.48
7.0.200.0000.00916.89
7.0.140.0030.07021.95
7.0.60.0070.08019.91
7.0.50.0070.08317.87
7.0.40.3730.05020.07
7.0.30.3470.05020.26
7.0.20.0070.05320.12
7.0.10.0030.04320.15
7.0.00.3170.04020.22
5.6.280.0100.06720.90
5.6.210.0100.05020.51
5.6.200.0100.08318.24
5.6.190.3230.04020.71
5.6.180.3570.03720.57
5.6.170.2700.04320.55
5.6.160.3230.04320.47
5.6.150.3230.03720.29
5.6.140.3400.03720.35
5.6.130.3230.04720.31
5.6.120.1270.04320.37
5.6.110.0030.04320.26
5.6.100.3200.03720.26
5.6.90.4030.04020.33
5.6.80.3300.04319.58
5.6.70.3130.03719.68
5.6.60.3370.03719.90
5.6.50.3400.04319.72
5.6.40.3470.04019.89
5.6.30.3530.04319.74
5.6.20.3600.04319.72
5.6.10.3200.04019.89
5.6.00.4070.03719.59
5.5.350.0330.06720.42
5.5.340.0130.08017.98
5.5.330.1470.06020.37
5.5.320.3370.04020.36
5.5.310.0130.08020.26
5.5.300.3370.04720.15
5.5.290.4170.04020.15
5.5.280.0030.04320.14
5.5.270.0070.04020.18
5.5.260.3670.03720.17
5.5.250.3770.04719.96
5.5.240.3430.04019.56
5.5.230.3400.04319.54
5.5.220.3400.04019.49
5.5.210.3670.04019.52
5.5.200.3370.04019.53
5.5.190.3470.04019.45
5.5.180.3100.04319.50
5.5.160.3970.04719.50
5.5.150.3930.04319.50
5.5.140.3500.04019.47
5.5.130.3870.03319.42
5.5.120.3070.03719.46
5.5.110.3270.04019.50
5.5.100.3530.03319.44
5.5.90.3270.03319.35
5.5.80.3300.03019.32
5.5.70.3100.04319.39
5.5.60.3070.02719.39
5.5.50.2930.04019.30
5.5.40.3330.03319.57
5.5.30.3230.04019.33
5.5.20.3170.04019.52
5.5.10.3200.04019.38
5.5.00.3230.03019.31
5.4.450.4000.04319.33
5.4.440.0100.03319.21
5.4.430.1770.03319.31
5.4.420.3970.03719.46
5.4.410.3830.03719.23
5.4.400.3500.04019.03
5.4.390.3630.03018.96
5.4.380.3530.03319.09
5.4.370.3400.03719.01
5.4.360.3370.04019.13
5.4.350.3130.03719.05
5.4.340.3100.04318.96
5.4.320.4130.03719.04
5.4.310.3700.04019.18
5.4.300.3200.03319.11
5.4.290.3370.04019.09
5.4.280.3530.02719.02
5.4.270.3500.03719.12
5.4.260.3370.03719.03
5.4.250.3430.04019.02
5.4.240.3400.03718.95
5.4.230.3730.03019.03
5.4.220.3200.03719.02
5.4.210.3330.04019.27
5.4.200.3200.03719.00
5.4.190.3800.03319.13
5.4.180.3630.04318.95
5.4.170.3230.03719.00
5.4.160.3100.03719.07
5.4.150.3700.04319.10
5.4.140.3570.03316.47
5.4.130.3370.03716.61
5.4.120.3900.03716.39
5.4.110.3700.03316.40
5.4.100.3300.03316.45
5.4.90.3370.04016.40
5.4.80.3230.02716.39
5.4.70.3770.03016.40
5.4.60.3970.03716.46
5.4.50.4100.03316.30
5.4.40.3670.03316.43
5.4.30.3400.03716.30
5.4.20.3570.03316.28
5.4.10.3900.03316.45
5.4.00.4100.03715.91
5.3.290.3800.03714.71
5.3.280.3230.03314.56
5.3.270.3730.04014.69
5.3.260.3100.04014.65
5.3.250.3270.04014.65
5.3.240.3270.03714.68
5.3.230.3530.03014.64
5.3.220.4070.04014.56
5.3.210.4100.03714.61
5.3.200.3400.03714.77
5.3.190.3470.04014.64
5.3.180.3530.03714.63
5.3.170.3770.03314.52
5.3.160.4170.03314.60
5.3.150.3930.03714.66
5.3.140.3700.04014.40
5.3.130.3600.03714.54
5.3.120.3530.03314.76
5.3.110.3500.04014.54
5.3.100.4170.03014.06
5.3.90.3930.03314.07
5.3.80.4100.04013.91
5.3.70.3530.03313.92
5.3.60.4130.03313.90
5.3.50.3800.03713.96
5.3.40.4100.04014.16
5.3.30.3400.03713.97
5.3.20.3400.03313.72
5.3.10.3430.03313.66
5.3.00.3200.03713.63
5.2.170.3600.02711.17
5.2.160.3500.03011.05
5.2.150.3270.03711.36
5.2.140.3000.02711.25
5.2.130.2600.03311.18
5.2.120.2730.02311.15
5.2.110.3030.02011.16
5.2.100.2900.03311.32
5.2.90.2730.03311.17
5.2.80.3500.02310.95
5.2.70.3200.02711.14
5.2.60.3470.02711.04
5.2.50.3170.02711.07
5.2.40.2630.02710.99
5.2.30.2530.02711.18
5.2.20.1870.03311.01
5.2.10.0070.04310.88
5.2.00.0070.03710.70
5.1.60.0100.04710.07
5.1.50.2800.02710.00
5.1.40.2700.02710.08
5.1.30.2930.02310.39
5.1.20.3000.03010.43
5.1.10.2870.02710.29
5.1.00.2070.0279.90
5.0.50.1470.0278.62
5.0.40.1670.0178.46
5.0.30.1700.0338.21
5.0.20.1470.0208.19
5.0.10.1070.0208.17
5.0.00.1230.0308.26
4.4.90.1600.0205.98
4.4.80.1670.0135.98
4.4.70.0100.0275.98
4.4.60.0000.0275.98
4.4.50.0030.0375.98
4.4.40.0470.0405.98
4.4.30.1600.0135.98
4.4.20.1670.0205.98
4.4.10.1270.0205.98
4.4.00.1430.0275.98
4.3.110.1470.0135.98
4.3.100.1800.0175.98
4.3.90.1300.0175.98
4.3.80.1170.0275.98
4.3.70.1170.0135.98
4.3.60.1200.0175.98
4.3.50.1470.0175.98
4.3.40.1470.0205.98
4.3.30.0730.0275.98
4.3.20.0630.0205.98
4.3.10.0730.0175.98
4.3.00.0600.0175.98

preferences:
46.9 ms | 401 KiB | 5 Q