3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mysqli = new mysqli('localhost', 'user', 'password', 'test'); function a(&$a,&$b,&$c) { $a = 3; var_dump($a); } $foo = [1, 2, 3]; $bar = [3, 4, 5]; $stmt = $mysqli->prepare("SELECT ?,?,?"); // What's the difference between this $stmt->bind_param('sss', $foo[0],$foo[1],$foo[2]); // and this a($foo[0],$foo[1],$foo[2]); $diff = array_diff($foo, $bar); $foo[1] = 'hi'; var_dump($foo, $diff);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T3M2Z
function name:  (null)
number of ops:  45
compiled vars:  !0 = $mysqli, !1 = $foo, !2 = $bar, !3 = $stmt, !4 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'mysqli'
          1        SEND_VAL_EX                                              'localhost'
          2        SEND_VAL_EX                                              'user'
          3        SEND_VAL_EX                                              'password'
          4        SEND_VAL_EX                                              'test'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $5
   11     7        ASSIGN                                                   !1, <array>
   12     8        ASSIGN                                                   !2, <array>
   14     9        INIT_METHOD_CALL                                         !0, 'prepare'
         10        SEND_VAL_EX                                              'SELECT+%3F%2C%3F%2C%3F'
         11        DO_FCALL                                      0  $10     
         12        ASSIGN                                                   !3, $10
   17    13        INIT_METHOD_CALL                                         !3, 'bind_param'
         14        SEND_VAL_EX                                              'sss'
         15        CHECK_FUNC_ARG                                           
         16        FETCH_DIM_FUNC_ARG                               $12     !1, 0
         17        SEND_FUNC_ARG                                            $12
         18        CHECK_FUNC_ARG                                           
         19        FETCH_DIM_FUNC_ARG                               $13     !1, 1
         20        SEND_FUNC_ARG                                            $13
         21        CHECK_FUNC_ARG                                           
         22        FETCH_DIM_FUNC_ARG                               $14     !1, 2
         23        SEND_FUNC_ARG                                            $14
         24        DO_FCALL                                      0          
   19    25        INIT_FCALL                                               'a'
         26        FETCH_DIM_W                                      $16     !1, 0
         27        SEND_REF                                                 $16
         28        FETCH_DIM_W                                      $17     !1, 1
         29        SEND_REF                                                 $17
         30        FETCH_DIM_W                                      $18     !1, 2
         31        SEND_REF                                                 $18
         32        DO_FCALL                                      0          
   21    33        INIT_FCALL                                               'array_diff'
         34        SEND_VAR                                                 !1
         35        SEND_VAR                                                 !2
         36        DO_ICALL                                         $20     
         37        ASSIGN                                                   !4, $20
   22    38        ASSIGN_DIM                                               !1, 1
         39        OP_DATA                                                  'hi'
   23    40        INIT_FCALL                                               'var_dump'
         41        SEND_VAR                                                 !1
         42        SEND_VAR                                                 !4
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T3M2Z
function name:  a
number of ops:  8
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    7     3        ASSIGN                                                   !0, 3
    8     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    9     7      > RETURN                                                   null

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.67 ms | 1403 KiB | 18 Q