3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pdm_get_val_sql($val) { $result = 'NULL'; if(isset($val) === true) { if(ctype_digit($val) !== false) { $result = (int)($val); } else { $result = '\''.pSQL($val).'\''; } } return $result; } function pSQL($val) { return $val; } echo pdm_get_val_sql('toto');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EIg7O
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'pdm_get_val_sql'
          1        SEND_VAL                                                 'toto'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function pdm_get_val_sql:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/EIg7O
function name:  pdm_get_val_sql
number of ops:  21
compiled vars:  !0 = $val, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, 'NULL'
    4     2        ISSET_ISEMPTY_CV                                 ~3      !0
          3        TYPE_CHECK                                    8          ~3
          4      > JMPZ                                                     ~4, ->19
    5     5    >   INIT_FCALL                                               'ctype_digit'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8        TYPE_CHECK                                  1018          $5
          9      > JMPZ                                                     ~6, ->13
    6    10    >   CAST                                          4  ~7      !0
         11        ASSIGN                                                   !1, ~7
         12      > JMP                                                      ->19
    9    13    >   INIT_FCALL_BY_NAME                                       'pSQL'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0  $9      
         16        CONCAT                                           ~10     '%27', $9
         17        CONCAT                                           ~11     ~10, '%27'
         18        ASSIGN                                                   !1, ~11
   12    19    > > RETURN                                                   !1
   13    20*     > RETURN                                                   null

End of function pdm_get_val_sql

Function psql:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EIg7O
function name:  pSQL
number of ops:  3
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1      > RETURN                                                   !0
          2*     > RETURN                                                   null

End of function psql

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.57 ms | 1399 KiB | 16 Q