3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cele_cislo($cislo) { return preg_match('/^[1-9]\d*$/', $cislo) === 1; } var_dump(cele_cislo('123456f')); var_dump(cele_cislo('f123456')); var_dump(cele_cislo('123456'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H78QU
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'cele_cislo'
          2        SEND_VAL                                                 '123456f'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    7     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'cele_cislo'
          8        SEND_VAL                                                 'f123456'
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
    8    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'cele_cislo'
         14        SEND_VAL                                                 '123456'
         15        DO_FCALL                                      0  $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function cele_cislo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H78QU
function name:  cele_cislo
number of ops:  8
compiled vars:  !0 = $cislo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5B1-9%5D%5Cd%2A%24%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        IS_IDENTICAL                                     ~2      $1, 1
          6      > RETURN                                                   ~2
    4     7*     > RETURN                                                   null

End of function cele_cislo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.04 ms | 1398 KiB | 20 Q