3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name="why";//声明变量$name,并初始化 function echoName1() { //在函数echoName1()里使用global来声明$name global $name; echo "the first name is ".$name."<br>"; } function echoName2() { //在函数echoName2()里没有使用global来声明$name echo "the second name is ".$name."<br>"; } echoName1(); echoName2(); $last_name = "O'Keefe"; echo $sql = "select * from users where last_name = '" . addslashes($last_name) . "'";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/11aEF
function name:  (null)
number of ops:  14
compiled vars:  !0 = $name, !1 = $last_name, !2 = $sql
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 'why'
   18     1        INIT_FCALL                                               'echoname1'
          2        DO_FCALL                                      0          
   19     3        INIT_FCALL                                               'echoname2'
          4        DO_FCALL                                      0          
   21     5        ASSIGN                                                   !1, 'O%27Keefe'
   22     6        INIT_FCALL                                               'addslashes'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
          9        CONCAT                                           ~8      'select+%2A+from+users+where+last_name+%3D+%27', $7
         10        CONCAT                                           ~9      ~8, '%27'
         11        ASSIGN                                           ~10     !2, ~9
         12        ECHO                                                     ~10
         13      > RETURN                                                   1

Function echoname1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/11aEF
function name:  echoName1
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   BIND_GLOBAL                                              !0, 'name'
   11     1        CONCAT                                           ~1      'the+first+name+is+', !0
          2        CONCAT                                           ~2      ~1, '%3Cbr%3E'
          3        ECHO                                                     ~2
   12     4      > RETURN                                                   null

End of function echoname1

Function echoname2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/11aEF
function name:  echoName2
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   CONCAT                                           ~1      'the+second+name+is+', !0
          1        CONCAT                                           ~2      ~1, '%3Cbr%3E'
          2        ECHO                                                     ~2
   17     3      > RETURN                                                   null

End of function echoname2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.93 ms | 1399 KiB | 17 Q