3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 1=> 'one', 2 => 'two', 3 => 'three'); unset( $a[2] ); print_r($a[2]); print_r($a[3]); $great = 'fantastic'; echo "This is {$great}"; $var1="a"; $$var1="b"; echo "$var1 $a"; class Insurance{ function clsNAme(){ echo get_class($this); } } print 5+2 * 4+6; $cl = new Insurance(); $cl->clsName(); Insurance::clsName(); var_dump (3*4); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.example.com/"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); $var = "testing module"; $statement = 'This is a $var'; echo ($statement); $var = "testing module"; $statement = "This is a $var"; echo ($statement); $arr = array("foo","bar","baz"); for ( $i = 0; $i < count($arr); $i++){ $item = $arr[$i]; } echo "<pre>"; print_r($item); echo "</pre><br/>\r\n"; $a = 3; print '$a'."\r\n"; echo '$a'."\r\n"; print "$a\r\n"; echo "$a\r\n"; $array = array(array(141,151,161), 2, 3, array(101, 202, 303)); function DisplayArray($array) { foreach ($array as $value) { if (is_array($value)) { DisplayArray($value); } else { echo $value . " "; } } } DisplayArray($array); echo 0x10; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 67
Branch analysis from position: 67
2 jumps found. (Code = 44) Position 1 = 70, Position 2 = 64
Branch analysis from position: 70
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 64
2 jumps found. (Code = 44) Position 1 = 70, Position 2 = 64
Branch analysis from position: 70
Branch analysis from position: 64
filename:       /in/c9KTb
function name:  (null)
number of ops:  90
compiled vars:  !0 = $a, !1 = $great, !2 = $var1, !3 = $cl, !4 = $ch, !5 = $var, !6 = $statement, !7 = $arr, !8 = $i, !9 = $item, !10 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        UNSET_DIM                                                !0, 2
    5     2        INIT_FCALL                                               'print_r'
          3        FETCH_DIM_R                                      ~12     !0, 2
          4        SEND_VAL                                                 ~12
          5        DO_ICALL                                                 
    6     6        INIT_FCALL                                               'print_r'
          7        FETCH_DIM_R                                      ~14     !0, 3
          8        SEND_VAL                                                 ~14
          9        DO_ICALL                                                 
    7    10        ASSIGN                                                   !1, 'fantastic'
    8    11        NOP                                                      
         12        FAST_CONCAT                                      ~17     'This+is+', !1
         13        ECHO                                                     ~17
    9    14        ASSIGN                                                   !2, 'a'
   10    15        FETCH_W                      local               $19     !2
         16        ASSIGN                                                   $19, 'b'
   11    17        ROPE_INIT                                     3  ~22     !2
         18        ROPE_ADD                                      1  ~22     ~22, '+'
         19        ROPE_END                                      2  ~21     ~22, !0
         20        ECHO                                                     ~21
   17    21        ECHO                                                     19
   18    22        NEW                                              $24     'Insurance'
         23        DO_FCALL                                      0          
         24        ASSIGN                                                   !3, $24
   19    25        INIT_METHOD_CALL                                         !3, 'clsName'
         26        DO_FCALL                                      0          
   20    27        INIT_STATIC_METHOD_CALL                                  'Insurance', 'clsName'
         28        DO_FCALL                                      0          
   22    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAL                                                 12
         31        DO_ICALL                                                 
   23    32        INIT_FCALL_BY_NAME                                       'curl_init'
         33        DO_FCALL                                      0  $30     
         34        ASSIGN                                                   !4, $30
   24    35        INIT_FCALL_BY_NAME                                       'curl_setopt'
         36        SEND_VAR_EX                                              !4
         37        FETCH_CONSTANT                                   ~32     'CURLOPT_URL'
         38        SEND_VAL_EX                                              ~32
         39        SEND_VAL_EX                                              'http%3A%2F%2Fwww.example.com%2F'
         40        DO_FCALL                                      0          
   25    41        INIT_FCALL_BY_NAME                                       'curl_setopt'
         42        SEND_VAR_EX                                              !4
         43        FETCH_CONSTANT                                   ~34     'CURLOPT_HEADER'
         44        SEND_VAL_EX                                              ~34
         45        SEND_VAL_EX                                              0
         46        DO_FCALL                                      0          
   26    47        INIT_FCALL_BY_NAME                                       'curl_exec'
         48        SEND_VAR_EX                                              !4
         49        DO_FCALL                                      0          
   27    50        INIT_FCALL_BY_NAME                                       'curl_close'
         51        SEND_VAR_EX                                              !4
         52        DO_FCALL                                      0          
   28    53        ASSIGN                                                   !5, 'testing+module'
   29    54        ASSIGN                                                   !6, 'This+is+a+%24var'
   30    55        ECHO                                                     !6
   32    56        ASSIGN                                                   !5, 'testing+module'
   33    57        NOP                                                      
         58        FAST_CONCAT                                      ~41     'This+is+a+', !5
         59        ASSIGN                                                   !6, ~41
   34    60        ECHO                                                     !6
   35    61        ASSIGN                                                   !7, <array>
   36    62        ASSIGN                                                   !8, 0
         63      > JMP                                                      ->67
   37    64    >   FETCH_DIM_R                                      ~45     !7, !8
         65        ASSIGN                                                   !9, ~45
   36    66        PRE_INC                                                  !8
         67    >   COUNT                                            ~48     !7
         68        IS_SMALLER                                               !8, ~48
         69      > JMPNZ                                                    ~49, ->64
   39    70    >   ECHO                                                     '%3Cpre%3E'
   40    71        INIT_FCALL                                               'print_r'
         72        SEND_VAR                                                 !9
         73        DO_ICALL                                                 
   41    74        ECHO                                                     '%3C%2Fpre%3E%3Cbr%2F%3E%0D%0A'
   43    75        ASSIGN                                                   !0, 3
   44    76        ECHO                                                     '%24a%0D%0A'
   45    77        ECHO                                                     '%24a%0D%0A'
   46    78        NOP                                                      
         79        FAST_CONCAT                                      ~52     !0, '%0D%0A'
         80        ECHO                                                     ~52
   47    81        NOP                                                      
         82        FAST_CONCAT                                      ~53     !0, '%0D%0A'
         83        ECHO                                                     ~53
   48    84        ASSIGN                                                   !10, <array>
   59    85        INIT_FCALL                                               'displayarray'
         86        SEND_VAR                                                 !10
         87        DO_FCALL                                      0          
   60    88        ECHO                                                     16
   61    89      > RETURN                                                   1

Function displayarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 12
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/c9KTb
function name:  DisplayArray
number of ops:  14
compiled vars:  !0 = $array, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   49     0  E >   RECV                                             !0      
   50     1      > FE_RESET_R                                       $2      !0, ->12
          2    > > FE_FETCH_R                                               $2, !1, ->12
   51     3    >   TYPE_CHECK                                  128          !1
          4      > JMPZ                                                     ~3, ->9
   52     5    >   INIT_FCALL_BY_NAME                                       'DisplayArray'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
          8      > JMP                                                      ->11
   54     9    >   CONCAT                                           ~5      !1, '%0A'
         10        ECHO                                                     ~5
   50    11    > > JMP                                                      ->2
         12    >   FE_FREE                                                  $2
   58    13      > RETURN                                                   null

End of function displayarray

Class Insurance:
Function clsname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c9KTb
function name:  clsNAme
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_THIS                                       ~0      
          1        GET_CLASS                                        ~1      ~0
          2        ECHO                                                     ~1
   15     3      > RETURN                                                   null

End of function clsname

End of class Insurance.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.08 ms | 1407 KiB | 18 Q