3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace { function callable_equals(callable ...$callables){ $normalizeCallable = function(callable $callable){ if(is_string($callable)){ $callable = strtolower($callable); $pieces = explode("::", $callable); if(count($pieces) == 2){ return [$pieces[0], $pieces[1]]; } return $callable; } if(is_string($callable[0])){ $callable[0] = strtolower($callable[0]); } $callable[1] = strtolower($callable[1]); return $callable; }; foreach($callables as $i => $callable) $callables[$i] = $normalizeCallable($callable); var_dump($a, $b); return $a === $b; } class Foo{static function bar(){}} } namespace A\b\C\d { class Foo{static function bar(){}} } namespace { var_dump(callable_equals( ['Foo', 'bar'], 'foo::BAR' )); var_dump(callable_equals( ['A\\b\\C\\d\\Foo', 'bAr'], 'a\\B\\c\\D\\FoO::bar' )); }

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.0040.01418.54
8.3.50.0110.01022.05
8.3.40.0110.00418.89
8.3.30.0150.00618.96
8.3.20.0040.00420.35
8.3.10.0050.00321.86
8.3.00.0060.00319.50
8.2.180.0180.00418.66
8.2.170.0080.00622.96
8.2.160.0100.00320.43
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0050.00319.66
8.2.110.0030.00719.33
8.2.100.0090.00317.75
8.2.90.0000.00919.34
8.2.80.0000.00917.97
8.2.70.0080.00017.63
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0080.00018.28
8.2.30.0000.00718.22
8.2.20.0000.00817.81
8.2.10.0050.00318.06
8.2.00.0000.00817.83
8.1.280.0130.01025.92
8.1.270.0030.00620.78
8.1.260.0030.00726.35
8.1.250.0080.00028.09
8.1.240.0090.00023.92
8.1.230.0080.00317.48
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0030.00717.35
8.1.190.0030.00617.38
8.1.180.0080.00018.10
8.1.170.0060.00320.25
8.1.160.0000.00722.02
8.1.150.0000.00818.91
8.1.140.0040.00417.48
8.1.130.0000.00717.89
8.1.120.0040.00417.48
8.1.110.0040.00417.41
8.1.100.0020.00517.48
8.1.90.0040.00417.37
8.1.80.0040.00417.44
8.1.70.0040.00417.34
8.1.60.0080.00017.46
8.1.50.0050.00317.47
8.1.40.0060.00317.59
8.1.30.0030.00517.69
8.1.20.0040.00417.64
8.1.10.0040.00417.44
8.1.00.0000.00817.53
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0040.00418.46
8.0.270.0030.00317.32
8.0.260.0030.00318.35
8.0.250.0030.00317.09
8.0.240.0030.00317.07
8.0.230.0040.00416.99
8.0.220.0030.00316.98
8.0.210.0040.00416.88
8.0.200.0030.00316.90
8.0.190.0030.00517.10
8.0.180.0000.00716.93
8.0.170.0060.00317.02
8.0.160.0020.00516.86
8.0.150.0000.00716.80
8.0.140.0000.00716.82
8.0.130.0050.00313.41
8.0.120.0030.00616.87
8.0.110.0070.00016.98
8.0.100.0030.00516.80
8.0.90.0040.00416.86
8.0.80.0130.00716.86
8.0.70.0040.00416.93
8.0.60.0040.00416.88
8.0.50.0050.00316.79
8.0.30.0140.00717.03
8.0.20.0070.01217.40
8.0.10.0000.00817.08
8.0.00.0090.00817.03
7.4.330.0000.00515.07
7.4.320.0030.00316.66
7.4.300.0030.00316.63
7.4.290.0030.00316.50
7.4.280.0030.00516.61
7.4.270.0000.00716.53
7.4.260.0030.00616.64
7.4.250.0040.00416.51
7.4.240.0040.00416.60
7.4.230.0000.00716.62
7.4.220.0100.01016.56
7.4.210.0090.00616.61
7.4.200.0000.00716.71
7.4.160.0100.00616.43
7.4.150.0130.00317.40
7.4.140.0050.01617.86
7.4.130.0130.00716.65
7.4.120.0090.00816.56
7.4.110.0180.00016.54
7.4.100.0120.01216.59
7.4.90.0060.01216.63
7.4.80.0060.01219.39
7.4.70.0120.00916.53
7.4.60.0090.00616.55
7.4.50.0000.00416.27
7.4.40.0130.00316.47
7.4.30.0100.00716.59
7.4.00.0070.00714.84
7.3.330.0000.00713.41
7.3.320.0070.00713.44
7.3.310.0000.00716.34
7.3.300.0000.00716.32
7.3.290.0030.00316.49
7.3.280.0050.01216.45
7.3.270.0170.00717.40
7.3.260.0130.00416.41
7.3.250.0100.00716.50
7.3.240.0110.00716.41
7.3.230.0180.00616.66
7.3.210.0070.01016.62
7.3.200.0130.00919.39
7.3.190.0070.00716.45
7.3.180.0070.01016.60
7.3.170.0130.00416.54
7.3.160.0170.00316.62
7.3.10.0060.00916.85
7.3.00.0070.00716.63
7.2.330.0070.01516.75
7.2.320.0080.00816.71
7.2.310.0090.00916.57
7.2.300.0100.00716.91
7.2.290.0030.01416.57
7.2.130.0070.00416.96
7.2.120.0080.00317.10
7.2.110.0090.00316.77
7.2.100.0070.00416.86
7.2.90.0030.00917.05
7.2.80.0040.01116.99
7.2.70.0000.00916.88
7.2.60.0050.00816.97
7.2.50.0030.00616.89
7.2.40.0070.00317.04
7.2.30.0100.00716.91
7.2.20.0080.00316.73
7.2.10.0060.01017.00
7.2.00.0000.01516.71
7.1.250.0070.00315.92
7.1.200.0090.00315.74
7.1.70.0040.00417.18
7.1.60.0090.01519.50
7.1.50.0070.01417.01
7.1.00.0000.07722.36
7.0.200.0550.00313.96
7.0.140.0030.05722.04
7.0.60.0030.08021.75
7.0.50.0030.06017.87
7.0.40.0100.07020.29
7.0.30.0530.07020.17
7.0.20.0200.04020.07
7.0.10.0230.06720.26
7.0.00.0070.06320.08
5.6.280.0070.07020.83
5.6.210.0070.03720.67
5.6.200.0100.07718.20
5.6.190.0100.04720.66
5.6.180.0170.07320.56
5.6.170.0300.04320.56
5.6.160.0070.08720.54
5.6.150.0170.07718.15
5.6.140.0030.08718.29
5.6.130.0070.08718.21
5.6.120.0100.04321.02
5.6.110.0130.08321.02
5.6.100.0100.06720.98
5.6.90.0130.08021.01
5.6.80.0100.07320.52
5.5.350.3800.04320.46
5.5.340.0070.08317.94
5.5.330.0170.07320.36
5.5.320.0130.06320.21
5.5.310.0270.04320.34
5.5.300.0030.04017.98
5.5.290.0030.04018.05
5.5.280.0130.07720.80
5.5.270.0070.09020.95
5.5.260.0000.09020.79
5.5.250.0100.08020.65
5.5.240.0100.03720.14
5.4.450.0830.06719.48
5.4.440.0770.06319.48
5.4.430.0130.06319.38
5.4.420.0970.04319.63
5.4.410.0200.05019.03
5.4.400.0070.06318.73
5.4.390.0230.05018.55
5.4.380.0230.06018.47
5.4.370.0300.04318.75
5.4.360.0100.06018.74
5.4.350.0230.05018.53
5.4.340.0270.04318.79
5.4.320.0200.05718.74
5.4.310.0130.05718.75
5.4.300.0230.04718.59
5.4.290.0330.03718.75
5.4.280.0200.05318.75
5.4.270.0300.04318.55
5.4.260.0070.06718.75
5.4.250.0200.05318.73
5.4.240.0200.06318.68
5.4.230.0170.05318.65
5.4.220.0170.05718.69
5.4.210.0130.06018.74
5.4.200.0230.04716.51
5.4.190.0170.05718.45
5.4.180.0200.05318.68
5.4.170.0200.07718.72
5.4.160.0200.05018.71
5.4.150.0200.05018.56
5.4.140.0200.05016.24
5.4.130.0170.05016.29
5.4.120.0300.04316.30
5.4.110.0200.04716.41
5.4.100.0370.05716.32
5.4.90.0270.06716.34
5.4.80.0170.05016.27
5.4.70.0330.04716.42
5.4.60.0200.04716.39
5.4.50.0130.05316.42
5.4.40.0230.05016.25
5.4.30.0330.04716.30
5.4.20.0230.05016.38
5.4.10.0270.04316.19
5.4.00.0200.04715.73
5.3.290.0130.06314.68
5.3.280.0170.05714.69
5.3.270.0100.06314.65
5.3.260.0270.04714.67
5.3.250.0100.06014.71
5.3.240.0200.05314.79
5.3.230.0230.05014.64
5.3.220.0170.05714.61
5.3.210.0300.04714.57
5.3.200.0170.05314.59
5.3.190.0100.06014.55
5.3.180.0230.05714.61
5.3.170.0130.06014.70
5.3.160.0270.04714.73
5.3.150.0130.05314.69
5.3.140.0300.05314.69
5.3.130.0200.07714.65
5.3.120.0300.06714.77
5.3.110.0300.05014.70
5.3.100.0200.05314.07
5.3.90.0270.06714.12
5.3.80.0200.06014.12
5.3.70.0300.06014.23
5.3.60.0270.04313.99
5.3.50.0230.04714.00
5.3.40.0200.06014.00
5.3.30.0200.05014.13
5.3.20.0170.05313.80
5.3.10.0200.05013.76
5.3.00.0200.05013.70
5.2.170.0070.05011.12
5.2.160.0300.02311.30
5.2.150.0170.04011.18
5.2.140.0170.04311.18
5.2.130.0100.04711.11
5.2.120.0200.03311.05
5.2.110.0100.04311.03
5.2.100.0130.04011.11
5.2.90.0230.03711.11
5.2.80.0130.04311.10
5.2.70.0230.03711.05
5.2.60.0200.04011.09
5.2.50.0170.03710.97
5.2.40.0070.04710.97
5.2.30.0130.04311.00
5.2.20.0030.05010.99
5.2.10.0130.04310.87
5.2.00.0130.04010.69
5.1.60.0100.03710.11
5.1.50.0170.03010.15
5.1.40.0100.0379.93
5.1.30.0170.03010.45
5.1.20.0230.03310.39
5.1.10.0270.02710.12
5.1.00.0170.03710.10
5.0.50.0170.0208.57
5.0.40.0100.0278.42
5.0.30.0100.0438.20
5.0.20.0130.0208.21
5.0.10.0130.0238.24
5.0.00.0030.0478.34
4.4.90.0070.0205.91
4.4.80.0070.0235.88
4.4.70.0030.0235.89
4.4.60.0100.0275.91
4.4.50.0170.0235.93
4.4.40.0130.0405.87
4.4.30.0070.0235.88
4.4.20.0330.0235.96
4.4.10.0100.0205.91
4.4.00.0100.0375.90
4.3.110.0100.0205.75
4.3.100.0070.0275.86
4.3.90.0030.0235.82
4.3.80.0100.0305.82
4.3.70.0030.0235.87
4.3.60.0100.0205.88
4.3.50.0070.0235.80
4.3.40.0100.0305.84
4.3.30.0030.0234.57
4.3.20.0070.0204.53
4.3.10.0030.0234.51
4.3.00.0070.0177.29

preferences:
41.5 ms | 401 KiB | 5 Q