3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pdoSet($field) { return "`" . str_replace("`", "``", $field) . "`" . "= :$field, "; return substr($set, 0, -2); } var_dump(pdoSet('name')); var_dump(pdoSet('test')); var_dump(pdoSet('`test333`'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qUvI9
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'pdoset'
          2        SEND_VAL                                                 'name'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    9     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'pdoset'
          8        SEND_VAL                                                 'test'
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
   10    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'pdoset'
         14        SEND_VAL                                                 '%60test333%60'
         15        DO_FCALL                                      0  $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function pdoset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qUvI9
function name:  pdoSet
number of ops:  20
compiled vars:  !0 = $field, !1 = $set
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%60'
          3        SEND_VAL                                                 '%60%60'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        CONCAT                                           ~3      '%60', $2
          7        CONCAT                                           ~4      ~3, '%60'
          8        ROPE_INIT                                     3  ~6      '%3D+%3A'
          9        ROPE_ADD                                      1  ~6      ~6, !0
         10        ROPE_END                                      2  ~5      ~6, '%2C+'
         11        CONCAT                                           ~8      ~4, ~5
         12      > RETURN                                                   ~8
    5    13*       INIT_FCALL                                               'substr'
         14*       SEND_VAR                                                 !1
         15*       SEND_VAL                                                 0
         16*       SEND_VAL                                                 -2
         17*       DO_ICALL                                         $9      
         18*       RETURN                                                   $9
    6    19*     > RETURN                                                   null

End of function pdoset

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.48 ms | 1398 KiB | 22 Q