3v4l.org

run code in 300+ PHP versions simultaneously
<?php function callable_equals(callable $a, callable $b){ $f = 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; }; $a = $f($a); $b = $f($b); var_dump($a, $b); return $a === $b; } class Foo{static function bar(){}} var_dump(callable_equals( ['Foo', 'bar'], '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.70.0090.00618.43
8.3.60.0070.01118.21
8.3.50.0130.00621.96
8.3.40.0120.00318.80
8.3.30.0110.00419.22
8.3.20.0040.00420.34
8.3.10.0040.00421.90
8.3.00.0040.00719.17
8.2.190.0100.01016.63
8.2.180.0210.00018.17
8.2.170.0120.00322.96
8.2.160.0060.00920.35
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0030.00526.16
8.2.120.0040.00419.79
8.2.110.0000.01021.13
8.2.100.0090.00318.03
8.2.90.0050.00319.22
8.2.80.0080.00017.97
8.2.70.0030.00617.63
8.2.60.0090.00018.16
8.2.50.0000.00818.10
8.2.40.0050.00320.07
8.2.30.0000.00718.02
8.2.20.0000.00817.68
8.2.10.0000.00818.19
8.2.00.0040.00417.77
8.1.280.0140.01125.92
8.1.270.0180.00024.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00721.25
8.1.230.0070.00417.83
8.1.220.0030.00517.79
8.1.210.0000.00818.77
8.1.200.0080.00417.48
8.1.190.0000.00917.35
8.1.180.0030.00518.10
8.1.170.0000.00820.44
8.1.160.0000.00722.08
8.1.150.0000.00818.91
8.1.140.0040.00417.36
8.1.130.0040.00417.89
8.1.120.0000.00717.46
8.1.110.0040.00417.46
8.1.100.0070.00017.51
8.1.90.0080.00017.44
8.1.80.0030.00317.52
8.1.70.0070.00017.48
8.1.60.0000.00817.62
8.1.50.0040.00417.53
8.1.40.0040.00417.57
8.1.30.0040.00417.63
8.1.20.0000.00817.61
8.1.10.0000.00717.62
8.1.00.0000.00817.43
8.0.300.0030.00618.77
8.0.290.0030.00616.88
8.0.280.0000.00718.48
8.0.270.0040.00417.31
8.0.260.0000.00617.29
8.0.250.0000.00717.08
8.0.240.0040.00416.95
8.0.230.0040.00416.95
8.0.220.0070.00017.03
8.0.210.0070.00016.86
8.0.200.0000.00717.02
8.0.190.0000.00917.04
8.0.180.0080.00016.93
8.0.170.0040.00417.02
8.0.160.0040.00417.07
8.0.150.0000.00716.93
8.0.140.0080.00017.02
8.0.130.0000.00713.48
8.0.120.0050.00316.94
8.0.110.0000.00816.88
8.0.100.0000.00816.86
8.0.90.0060.00316.82
8.0.80.0140.00716.92
8.0.70.0080.00016.98
8.0.60.0070.00017.06
8.0.50.0040.00417.02
8.0.30.0120.01117.11
8.0.20.0100.00717.40
8.0.10.0000.00717.11
8.0.00.0080.00916.78
7.4.330.0000.00515.22
7.4.320.0000.00616.50
7.4.300.0000.00616.55
7.4.290.0030.00316.68
7.4.280.0070.00016.58
7.4.270.0000.00716.55
7.4.260.0000.00716.59
7.4.250.0080.00016.52
7.4.240.0000.00816.61
7.4.230.0000.00716.73
7.4.220.0070.01416.50
7.4.210.0030.01216.61
7.4.200.0030.00616.51
7.4.160.0070.01416.48
7.4.150.0150.00317.40
7.4.140.0150.00617.86
7.4.130.0130.00516.48
7.4.120.0100.01116.60
7.4.110.0170.00716.39
7.4.100.0150.00816.53
7.4.90.0070.01116.45
7.4.80.0070.01319.39
7.4.70.0090.00916.52
7.4.60.0070.01316.78
7.4.50.0000.00616.38
7.4.40.0040.01416.51
7.4.30.0070.01016.49
7.4.00.0060.00914.97
7.3.330.0000.00613.35
7.3.320.0130.00013.37
7.3.310.0000.00716.38
7.3.300.0000.00716.39
7.3.290.0000.00716.38
7.3.280.0070.01116.38
7.3.270.0100.01017.40
7.3.260.0040.01216.62
7.3.250.0090.00816.47
7.3.240.0100.01016.70
7.3.230.0050.01516.57
7.3.210.0060.01016.66
7.3.200.0130.00719.39
7.3.190.0060.01016.47
7.3.180.0030.01616.41
7.3.170.0110.00716.43
7.3.160.0080.01216.50
7.3.10.0110.00616.32
7.3.00.0060.01016.27
7.2.330.0130.00616.57
7.2.320.0030.01316.86
7.2.310.0060.01616.43
7.2.300.0160.00316.65
7.2.290.0060.01916.77
7.2.130.0090.00916.71
7.2.120.0080.01116.73
7.2.110.0120.00916.54
7.2.100.0090.00416.40
7.2.90.0140.00416.47
7.2.80.0120.00516.60
7.2.70.0070.00716.79
7.2.60.0080.00616.56
7.2.50.0110.00916.85
7.2.40.0100.01316.57
7.2.30.0090.00816.49
7.2.20.0120.00716.55
7.2.10.0140.00616.53
7.2.00.0100.00517.65
7.1.250.0070.00715.48
7.1.200.0030.00915.89
7.1.100.0000.01117.97
7.1.70.0070.01117.09
7.1.60.0070.01719.50
7.1.50.0000.01216.98
7.1.00.0100.06722.36
7.0.200.0350.00314.86
7.0.140.0030.07322.09
7.0.60.0100.07719.93
7.0.50.0070.03717.82
7.0.40.0030.07320.40
7.0.30.0330.07320.11
7.0.20.0230.06720.11
7.0.10.0270.09020.11
7.0.00.0100.08020.32
5.6.210.0100.07720.76
5.6.200.0070.06718.19
5.6.190.0070.08020.41
5.6.180.0200.04720.43
5.6.170.0270.07720.62
5.6.160.0070.08720.52
5.6.150.0100.07718.16
5.6.140.0030.04018.21
5.6.130.0070.08318.15
5.6.120.0030.07321.03
5.6.110.0130.08020.99
5.6.100.0030.08021.02
5.6.90.0130.04721.09
5.6.80.0070.03320.39
5.5.350.0170.08020.41
5.5.340.0070.07718.08
5.5.330.0100.07720.25
5.5.320.0200.07720.13
5.5.310.0400.06720.26
5.5.300.0070.07318.08
5.5.290.0100.05718.07
5.5.280.0030.08020.81
5.5.270.0070.04320.81
5.5.260.0070.05020.78
5.5.250.0200.07720.63
5.5.240.0070.08020.17
5.4.450.0830.06719.38
5.4.440.1030.07019.61
5.4.430.0100.05319.33
5.4.420.0800.06319.55
5.4.410.0130.06719.32
5.4.400.0130.05318.53
5.4.390.0100.05718.62
5.4.380.0100.06018.57
5.4.370.0230.07718.69
5.4.360.0200.05018.62
5.4.350.0200.05018.52
5.4.340.0130.05318.51
5.4.320.0230.04718.79
5.4.310.0070.06018.46
5.4.300.0170.05018.78
5.4.290.0200.04718.51
5.4.280.0100.05718.62
5.4.270.0130.05018.73
5.4.260.0170.05018.68
5.4.250.0130.05318.59
5.4.240.0170.05318.62
5.4.230.0100.05718.72
5.4.220.0170.05018.74
5.4.210.0170.05318.64
5.4.200.0200.04316.80
5.4.190.0100.05318.77
5.4.180.0070.06018.52
5.4.170.0170.05018.53
5.4.160.0130.05318.54
5.4.150.0130.05318.72
5.4.140.0170.05016.20
5.4.130.0070.05316.34
5.4.120.0130.04716.33
5.4.110.0200.04316.25
5.4.100.0070.05716.46
5.4.90.0230.04016.17
5.4.80.0100.05316.31
5.4.70.0030.06716.43
5.4.60.0200.04716.25
5.4.50.0200.05016.27
5.4.40.0270.04316.24
5.4.30.0170.04316.29
5.4.20.0170.05016.28
5.4.10.0030.05716.41
5.4.00.0070.05315.65
5.3.290.0070.05714.88
5.3.280.1470.04714.76
5.3.270.0230.05014.79
5.3.260.0370.05014.63
5.3.250.0100.04714.65
5.3.240.0070.05014.72
5.3.230.0100.05314.72
5.3.220.0000.05714.67
5.3.210.0030.05314.63
5.3.200.0370.04714.57
5.3.190.0070.05314.59
5.3.180.0200.05014.63
5.3.170.0130.04714.61
5.3.160.0130.04314.63
5.3.150.0130.04314.55
5.3.140.0070.05014.58
5.3.130.0070.05314.61
5.3.120.0030.05314.57
5.3.110.0000.06014.72
5.3.100.0030.05714.04
5.3.90.0030.05314.16
5.3.80.0030.06014.08
5.3.70.0100.04314.05
5.3.60.0170.05314.04
5.3.50.0100.04314.07
5.3.40.0130.05314.02
5.3.30.0030.07014.08
5.3.20.0200.05713.82
5.3.10.0070.06713.77
5.3.00.0030.07013.76
5.2.170.0100.05311.24
5.2.160.0070.05311.26
5.2.150.0030.04311.26
5.2.140.0070.04311.19
5.2.130.0170.04311.30
5.2.120.0030.04011.17
5.2.110.0130.04011.21
5.2.100.0070.04011.17
5.2.90.0000.05011.12
5.2.80.0070.06011.17
5.2.70.0130.05011.21
5.2.60.0100.04011.07
5.2.50.0200.03311.12
5.2.40.0170.03311.09
5.2.30.0170.03311.09
5.2.20.0030.04711.00
5.2.10.0070.04310.97
5.2.00.0130.03710.82
5.1.60.0130.03010.09
5.1.50.0130.0309.98
5.1.40.0100.0309.92
5.1.30.0070.04010.44
5.1.20.0030.04310.53
5.1.10.0100.03710.25
5.1.00.0100.04010.25
5.0.50.0070.0278.57
5.0.40.0000.0308.48
5.0.30.0000.0478.43
5.0.20.0070.0278.29
5.0.10.0070.0278.19
5.0.00.0030.0438.28
4.4.90.0000.0235.90
4.4.80.0000.0235.88
4.4.70.0070.0205.86
4.4.60.0070.0175.88
4.4.50.0000.0235.89
4.4.40.0030.0335.91
4.4.30.0130.0135.91
4.4.20.0000.0276.00
4.4.10.0000.0275.98
4.4.00.0070.0305.93
4.3.110.0000.0235.83
4.3.100.0000.0235.86
4.3.90.0000.0235.89
4.3.80.0030.0335.89
4.3.70.0070.0175.77
4.3.60.0030.0205.87
4.3.50.0000.0235.77
4.3.40.0000.0375.80
4.3.30.0030.0204.56
4.3.20.0030.0274.55
4.3.10.0000.0274.50
4.3.00.0100.0237.11

preferences:
52.28 ms | 401 KiB | 5 Q