3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! function get_in_sql($getdata){ if(is_array($getdata)) { //$string = ""; if (count($getdata) == 1) { $string = $getdata[0]; } else { foreach ($getdata as $value) { $string .= $value.","; } } return $string; } return $getdata; } $array = array('0'=>1,'1'=>3,'2'=>2); echo get_in_sql($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/esKks
function name:  (null)
number of ops:  6
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ASSIGN                                                   !0, <array>
   22     1        INIT_FCALL                                               'get_in_sql'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function get_in_sql:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/esKks
function name:  get_in_sql
number of ops:  18
compiled vars:  !0 = $getdata, !1 = $string, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~3, ->16
    6     3    >   COUNT                                            ~4      !0
          4        IS_EQUAL                                                 ~4, 1
          5      > JMPZ                                                     ~5, ->9
    7     6    >   FETCH_DIM_R                                      ~6      !0, 0
          7        ASSIGN                                                   !1, ~6
          8      > JMP                                                      ->15
    9     9    > > FE_RESET_R                                       $8      !0, ->14
         10    > > FE_FETCH_R                                               $8, !2, ->14
   10    11    >   CONCAT                                           ~9      !2, '%2C'
         12        ASSIGN_OP                                     8          !1, ~9
    9    13      > JMP                                                      ->10
         14    >   FE_FREE                                                  $8
   14    15    > > RETURN                                                   !1
   17    16    > > RETURN                                                   !0
   18    17*     > RETURN                                                   null

End of function get_in_sql

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
270.77 ms | 1399 KiB | 15 Q