3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numeric_string = '42'; $integer = 42; $test = 'test'; ctype_digit($numeric_string); // true ctype_digit($integer); // false ctype_digit($test); // false is_numeric($numeric_string); // true is_numeric($integer); // true is_numeric($test); // true
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ej24X
function name:  (null)
number of ops:  22
compiled vars:  !0 = $numeric_string, !1 = $integer, !2 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '42'
    4     1        ASSIGN                                                   !1, 42
    6     2        ASSIGN                                                   !2, 'test'
    8     3        INIT_FCALL                                               'ctype_digit'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    9     6        INIT_FCALL                                               'ctype_digit'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   10     9        INIT_FCALL                                               'ctype_digit'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
   12    12        INIT_FCALL                                               'is_numeric'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
   13    15        INIT_FCALL                                               'is_numeric'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   14    18        INIT_FCALL                                               'is_numeric'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.16 ms | 1395 KiB | 17 Q