3v4l.org

run code in 300+ PHP versions simultaneously
<?php // How to check a variable to see if it can be called // as a function. // // Simple variable containing a function // function someFunction() { } $functionVariable = 'someFunction'; var_dump(is_callable($functionVariable, false, $callable_name)); // bool(true) echo $callable_name, "\n"; // someFunction // // Array containing a method // class someClass { function someMethod() { } } $anObject = new someClass(); $methodVariable = array($anObject, 'someMethod'); var_dump(is_callable($methodVariable, true, $callable_name)); // bool(true) echo $callable_name, "\n"; // someClass::someMethod

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.0100.00716.75
8.3.50.0090.01016.34
8.3.40.0080.00818.74
8.3.30.0100.00318.60
8.3.20.0130.00318.51
8.3.10.0060.00320.56
8.3.00.0050.00319.25
8.2.180.0090.00916.63
8.2.170.0140.00022.96
8.2.160.0100.00718.84
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00418.91
8.2.110.0070.00321.03
8.2.100.0100.00317.84
8.2.90.0030.00619.48
8.2.80.0000.00719.46
8.2.70.0030.00617.50
8.2.60.0040.00417.91
8.2.50.0080.00018.07
8.2.40.0030.00618.14
8.2.30.0000.00717.92
8.2.20.0060.00619.45
8.2.10.0000.00717.83
8.2.00.0080.00017.73
8.1.280.0120.00325.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0060.00322.46
8.1.230.0070.00320.96
8.1.220.0060.00317.74
8.1.210.0040.00418.96
8.1.200.0040.00417.35
8.1.190.0000.00917.28
8.1.180.0080.00018.10
8.1.170.0040.00418.78
8.1.160.0000.00718.94
8.1.150.0000.00718.66
8.1.140.0040.00417.49
8.1.130.0030.00517.74
8.1.120.0000.00717.43
8.1.110.0040.00417.35
8.1.100.0000.00717.37
8.1.90.0000.00817.31
8.1.80.0050.00317.36
8.1.70.0040.00417.41
8.1.60.0040.00417.46
8.1.50.0000.00817.46
8.1.40.0040.00417.47
8.1.30.0040.00417.67
8.1.20.0040.00417.67
8.1.10.0030.00617.57
8.1.00.0040.00417.57
8.0.300.0070.00319.86
8.0.290.0050.00216.75
8.0.280.0070.00018.44
8.0.270.0000.00717.16
8.0.260.0000.00716.73
8.0.250.0000.00716.99
8.0.240.0030.00316.86
8.0.230.0000.00816.91
8.0.220.0000.00716.94
8.0.210.0040.00416.87
8.0.200.0000.00716.83
8.0.190.0050.00316.84
8.0.180.0000.00716.93
8.0.170.0050.00516.87
8.0.160.0000.00716.95
8.0.150.0060.00316.76
8.0.140.0000.00716.91
8.0.130.0030.00313.37
8.0.120.0000.00716.80
8.0.110.0000.00816.84
8.0.100.0050.00316.84
8.0.90.0040.00416.89
8.0.80.0060.00916.85
8.0.70.0000.00716.78
8.0.60.0000.00716.71
8.0.50.0040.00417.00
8.0.30.0100.00716.84
8.0.20.0100.00817.04
8.0.10.0050.00316.97
8.0.00.0090.00816.68
7.4.330.0000.00513.00
7.4.320.0060.00316.56
7.4.300.0070.00016.59
7.4.290.0000.00616.58
7.4.280.0030.00616.64
7.4.270.0030.00316.61
7.4.260.0000.00513.27
7.4.250.0050.00316.57
7.4.240.0040.00416.64
7.4.230.0020.00516.39
7.4.220.0120.00816.51
7.4.210.0030.01416.54
7.4.200.0000.00716.60
7.4.190.0000.00716.56
7.4.160.0080.00816.48
7.4.150.0080.00916.39
7.4.140.0070.01116.55
7.4.130.0120.00916.68
7.4.120.0090.00916.44
7.4.110.0190.00016.64
7.4.100.0100.01416.43
7.4.90.0130.00516.44
7.4.80.0090.00619.39
7.4.70.0100.00716.39
7.4.60.0160.00016.41
7.4.50.0030.00316.16
7.4.40.0130.01016.50
7.4.30.0090.00616.51
7.4.10.0060.01015.05
7.4.00.0040.01314.89
7.3.330.0060.00013.32
7.3.320.0050.00013.24
7.3.310.0000.00816.16
7.3.300.0030.00316.25
7.3.290.0100.00416.27
7.3.280.0090.00616.33
7.3.270.0080.01616.45
7.3.260.0090.00816.30
7.3.250.0120.00916.44
7.3.240.0070.01016.63
7.3.230.0120.00616.69
7.3.210.0000.01816.43
7.3.200.0100.00616.52
7.3.190.0130.00716.39
7.3.180.0160.00316.20
7.3.170.0080.00816.30
7.3.160.0120.00616.29
7.3.130.0080.01114.70
7.3.120.0090.00614.76
7.3.110.0060.01315.08
7.3.100.0030.01314.75
7.3.90.0090.00614.45
7.3.80.0090.00914.68
7.3.70.0120.00314.60
7.3.60.0030.00914.42
7.3.50.0040.01114.84
7.3.40.0070.00714.75
7.3.30.0090.00314.53
7.3.20.0100.00716.63
7.3.10.0050.01016.70
7.3.00.0080.00716.70
7.2.330.0090.00916.59
7.2.320.0160.00716.72
7.2.310.0090.00916.41
7.2.300.0100.01316.48
7.2.290.0090.01216.52
7.2.260.0090.00915.20
7.2.250.0130.00614.86
7.2.240.0070.00715.02
7.2.230.0060.00914.73
7.2.220.0070.01015.25
7.2.210.0060.00914.90
7.2.200.0060.01214.82
7.2.190.0130.00314.87
7.2.180.0140.00014.93
7.2.170.0000.01414.68
7.2.160.0030.00714.96
7.2.150.0070.00716.79
7.2.140.0000.01916.72
7.2.130.0050.01116.87
7.2.120.0030.01317.01
7.2.110.0060.00816.54
7.2.100.0050.01116.66
7.2.90.0080.00516.78
7.2.80.0060.00616.83
7.2.70.0040.00716.91
7.2.60.0080.00816.77
7.2.50.0040.01116.95
7.2.40.0040.00816.70
7.2.30.0070.00616.96
7.2.20.0090.00716.81
7.2.10.0000.01416.74
7.2.00.0070.00717.70
7.1.330.0070.00715.90
7.1.320.0060.01215.59
7.1.310.0000.01315.98
7.1.300.0000.00915.59
7.1.290.0120.00315.77
7.1.280.0060.00615.78
7.1.270.0060.00815.80
7.1.260.0040.01415.82
7.1.250.0020.01015.76
7.1.240.0000.01315.75
7.1.230.0090.00615.80
7.1.220.0000.01015.83
7.1.210.0000.01315.55
7.1.200.0030.00615.82
7.1.190.0000.01315.82
7.1.180.0090.00615.82
7.1.170.0070.00715.72
7.1.160.0100.00315.85
7.1.150.0060.00615.76
7.1.140.0030.00715.85
7.1.130.0080.00015.87
7.1.120.0100.00315.80
7.1.110.0030.00615.89
7.1.100.0040.00817.02
7.1.90.0140.00015.63
7.1.80.0060.00315.76
7.1.70.0120.00616.57
7.1.60.0040.01617.63
7.1.50.0050.01316.15
7.1.40.0040.00715.88
7.1.30.0040.01115.68
7.1.20.0090.00915.84
7.1.10.0040.00715.73
7.1.00.0060.03519.17
7.0.330.0000.01115.45
7.0.320.0060.00315.45
7.0.310.0060.00315.35
7.0.300.0060.00315.24
7.0.290.0070.00715.38
7.0.280.0030.00615.22
7.0.270.0100.00315.38
7.0.260.0040.00815.36
7.0.250.0000.00915.38
7.0.240.0030.00715.22
7.0.230.0070.00715.55
7.0.220.0070.00315.09
7.0.210.0070.00715.30
7.0.200.0050.00616.00
7.0.190.0110.00415.32
7.0.180.0030.00615.23
7.0.170.0000.00915.59
7.0.160.0080.00015.38
7.0.150.0120.00315.24
7.0.140.0070.03818.67
7.0.130.0050.00315.01
7.0.120.0000.04018.75
7.0.110.0070.01015.25
7.0.100.0070.00715.48
7.0.90.0070.01015.42
7.0.80.0140.00015.28
7.0.70.0000.00915.40
7.0.60.0060.03917.70
7.0.50.0110.03216.45
7.0.40.0000.05216.89
7.0.30.0170.04416.78
7.0.20.0170.02416.79
7.0.10.0210.03716.86
7.0.00.0060.04816.80
5.6.400.0090.00014.57
5.6.390.0000.01314.40
5.6.380.0040.01114.10
5.6.370.0000.00914.57
5.6.360.0030.01014.23
5.6.350.0030.00714.34
5.6.340.0060.00914.35
5.6.330.0090.00614.53
5.6.320.0090.00614.05
5.6.310.0060.00614.50
5.6.300.0070.00714.45
5.6.290.0040.01214.46
5.6.280.0030.04217.52
5.6.270.0060.00314.62
5.6.260.0130.00314.40
5.6.250.0100.00014.30
5.6.240.0060.00314.25
5.6.230.0000.01014.41
5.6.220.0080.00314.09
5.6.210.0070.02217.40
5.6.200.0080.04416.38
5.6.190.0050.03917.36
5.6.180.0180.04117.28
5.6.170.0220.03317.33
5.6.160.0120.04017.47
5.6.150.0040.02616.09
5.6.140.0110.03616.17
5.6.130.0080.02716.25
5.6.120.0060.02717.55
5.6.110.0150.04017.56
5.6.100.0050.03517.67
5.6.90.0070.03917.55
5.6.80.0050.04817.22
5.6.70.0130.03217.35
5.6.60.0060.00914.35
5.6.50.0040.01114.34
5.6.40.0000.01014.13
5.6.30.0060.00314.09
5.6.20.0060.01014.10
5.6.10.0060.00914.11
5.6.00.0030.00614.13
5.5.380.0070.00714.37
5.5.370.0000.01014.18
5.5.360.0070.00714.47
5.5.350.0250.03817.36
5.5.340.0100.04216.21
5.5.330.0020.02917.13
5.5.320.0120.04417.28
5.5.310.0160.04117.14
5.5.300.0030.02616.33
5.5.290.0060.02516.30
5.5.280.0030.02917.51
5.5.270.0050.03417.34
5.5.260.0060.02417.58
5.5.250.0030.03417.37
5.5.240.0070.04717.07
5.5.230.0070.00714.05
5.5.220.0000.00814.20
5.5.210.0080.00814.07
5.5.200.0030.01013.82
5.5.190.0140.00013.82
5.5.180.0030.01213.93
5.5.170.0070.00413.92
5.5.160.0000.00914.38
5.5.150.0000.01413.91
5.5.140.0000.00813.97
5.5.130.0040.01113.92
5.5.120.0030.01014.24
5.5.110.0060.00314.02
5.5.100.0040.01114.04
5.5.90.0040.01114.27
5.5.80.0110.00314.37
5.5.70.0110.00314.26
5.5.60.0030.01214.22
5.5.50.0070.00714.26
5.5.40.0000.01214.22
5.5.30.0040.01113.89
5.5.20.0100.00713.97
5.5.10.0030.00514.35
5.5.00.0030.01013.91
5.4.450.0030.02315.73
5.4.440.0070.03915.69
5.4.430.0030.04215.65
5.4.420.0080.02715.64
5.4.410.0050.04515.47
5.4.400.0080.03715.57
5.4.390.0070.04015.57
5.4.380.0050.03215.38
5.4.370.0080.04015.58
5.4.360.0020.04515.51
5.4.350.0000.04515.53
5.4.340.0060.03615.39
5.4.330.0000.00711.90
5.4.320.0120.03515.38
5.4.310.0090.03115.41
5.4.300.0030.03015.57
5.4.290.0050.02415.52
5.4.280.0050.04315.44
5.4.270.0050.02515.38
5.4.260.0070.02215.45
5.4.250.0050.03815.41
5.4.240.0050.02515.53
5.4.230.0030.04115.57
5.4.220.0060.02515.37
5.4.210.0050.04015.46
5.4.200.0070.03215.44
5.4.190.0020.03515.37
5.4.180.0080.03815.36
5.4.170.0080.04115.53
5.4.160.0100.02315.43
5.4.150.0040.02515.57
5.4.140.0020.04014.15
5.4.130.0030.02414.14
5.4.120.0050.03914.10
5.4.110.0080.03514.16
5.4.100.0030.03514.18
5.4.90.0070.02214.13
5.4.80.0100.03214.11
5.4.70.0020.02714.11
5.4.60.0030.03314.18
5.4.50.0080.03314.15
5.4.40.0030.02214.15
5.4.30.0030.02314.15
5.4.20.0070.02214.08
5.4.10.0100.03514.28
5.4.00.0070.02213.92
5.3.290.0050.04213.29
5.3.280.0050.04113.33
5.3.270.0020.03313.28
5.3.260.0060.03213.26
5.3.250.0030.04013.21
5.3.240.0030.03413.29
5.3.230.0020.04213.26
5.3.220.0020.02713.26
5.3.210.0030.04513.23
5.3.200.0060.03513.23
5.3.190.0030.04213.25
5.3.180.0030.04113.31
5.3.170.0010.02313.24
5.3.160.0030.03713.30
5.3.150.0010.03913.28
5.3.140.0090.03013.18
5.3.130.0020.02613.25
5.3.120.0020.04713.22
5.3.110.0080.02613.22
5.3.100.0030.02812.92
5.3.90.0120.03012.96
5.3.80.0060.01812.95
5.3.70.0020.02312.98
5.3.60.0050.02512.91
5.3.50.0070.03612.93
5.3.40.0070.02512.96
5.3.30.0030.04312.98
5.3.20.0020.02412.81
5.3.10.0080.02512.78
5.3.00.0030.03312.79
5.2.170.0130.05311.12
5.2.160.0070.04711.31
5.2.150.0130.05011.15
5.2.140.0070.03711.04
5.2.130.0000.03011.26
5.2.120.0030.05711.03
5.2.110.0070.06311.12
5.2.100.0030.04011.15
5.2.90.0070.05711.16
5.2.80.0070.06011.10
5.2.70.0070.06311.26
5.2.60.0000.05011.00
5.2.50.0030.03311.08
5.2.40.0000.03311.03
5.2.30.0030.03010.94
5.2.20.0000.03710.96
5.2.10.0000.03710.82
5.2.00.0030.06310.86
5.1.60.0100.04710.06
5.1.50.0030.0239.97
5.1.40.0000.0309.97
5.1.30.0000.03010.39
5.1.20.0070.03010.43
5.1.10.0000.03710.15
5.1.00.0000.04010.12
5.0.50.0000.0438.46
5.0.40.0000.0238.41
5.0.30.0000.0678.41
5.0.20.0070.0378.41
5.0.10.0070.0408.41
5.0.00.0000.0508.41
4.4.90.0070.0308.41
4.4.80.0000.0208.41
4.4.70.0030.0178.41
4.4.60.0000.0208.41
4.4.50.0000.0208.41
4.4.40.0030.0238.41
4.4.30.0100.0308.41
4.4.20.0000.0208.41
4.4.10.0000.0378.41
4.4.00.0030.0338.41
4.3.110.0000.0178.41
4.3.100.0030.0338.41
4.3.90.0030.0208.41
4.3.80.0000.0478.41
4.3.70.0070.0238.41
4.3.60.0030.0338.41
4.3.50.0000.0278.41
4.3.40.0000.0338.41
4.3.30.0000.0178.41
4.3.20.0000.0208.41
4.3.10.0030.0278.41
4.3.00.0000.0278.41

preferences:
48.75 ms | 401 KiB | 5 Q