3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=4; $j=30; $k=0; $k=$j++/$i++; echo $i . ' ' . $j . ' ' . $k . ' ' .'\r\n'; $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 = 81
Branch analysis from position: 81
2 jumps found. (Code = 44) Position 1 = 84, Position 2 = 78
Branch analysis from position: 84
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 78
2 jumps found. (Code = 44) Position 1 = 84, Position 2 = 78
Branch analysis from position: 84
Branch analysis from position: 78
filename:       /in/rG1rJ
function name:  (null)
number of ops:  104
compiled vars:  !0 = $i, !1 = $j, !2 = $k, !3 = $a, !4 = $great, !5 = $var1, !6 = $cl, !7 = $ch, !8 = $var, !9 = $statement, !10 = $arr, !11 = $item, !12 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 4
    3     1        ASSIGN                                                   !1, 30
    4     2        ASSIGN                                                   !2, 0
    5     3        POST_INC                                         ~16     !1
          4        POST_INC                                         ~17     !0
          5        DIV                                              ~18     ~16, ~17
          6        ASSIGN                                                   !2, ~18
    6     7        CONCAT                                           ~20     !0, '+'
          8        CONCAT                                           ~21     ~20, !1
          9        CONCAT                                           ~22     ~21, '+'
         10        CONCAT                                           ~23     ~22, !2
         11        CONCAT                                           ~24     ~23, '+'
         12        CONCAT                                           ~25     ~24, '%5Cr%5Cn'
         13        ECHO                                                     ~25
    8    14        ASSIGN                                                   !3, <array>
    9    15        UNSET_DIM                                                !3, 2
   10    16        INIT_FCALL                                               'print_r'
         17        FETCH_DIM_R                                      ~27     !3, 2
         18        SEND_VAL                                                 ~27
         19        DO_ICALL                                                 
   11    20        INIT_FCALL                                               'print_r'
         21        FETCH_DIM_R                                      ~29     !3, 3
         22        SEND_VAL                                                 ~29
         23        DO_ICALL                                                 
   12    24        ASSIGN                                                   !4, 'fantastic'
   13    25        NOP                                                      
         26        FAST_CONCAT                                      ~32     'This+is+', !4
         27        ECHO                                                     ~32
   14    28        ASSIGN                                                   !5, 'a'
   15    29        FETCH_W                      local               $34     !5
         30        ASSIGN                                                   $34, 'b'
   16    31        ROPE_INIT                                     3  ~37     !5
         32        ROPE_ADD                                      1  ~37     ~37, '+'
         33        ROPE_END                                      2  ~36     ~37, !3
         34        ECHO                                                     ~36
   22    35        ECHO                                                     19
   23    36        NEW                                              $39     'Insurance'
         37        DO_FCALL                                      0          
         38        ASSIGN                                                   !6, $39
   24    39        INIT_METHOD_CALL                                         !6, 'clsName'
         40        DO_FCALL                                      0          
   25    41        INIT_STATIC_METHOD_CALL                                  'Insurance', 'clsName'
         42        DO_FCALL                                      0          
   27    43        INIT_FCALL                                               'var_dump'
         44        SEND_VAL                                                 12
         45        DO_ICALL                                                 
   28    46        INIT_FCALL_BY_NAME                                       'curl_init'
         47        DO_FCALL                                      0  $45     
         48        ASSIGN                                                   !7, $45
   29    49        INIT_FCALL_BY_NAME                                       'curl_setopt'
         50        SEND_VAR_EX                                              !7
         51        FETCH_CONSTANT                                   ~47     'CURLOPT_URL'
         52        SEND_VAL_EX                                              ~47
         53        SEND_VAL_EX                                              'http%3A%2F%2Fwww.example.com%2F'
         54        DO_FCALL                                      0          
   30    55        INIT_FCALL_BY_NAME                                       'curl_setopt'
         56        SEND_VAR_EX                                              !7
         57        FETCH_CONSTANT                                   ~49     'CURLOPT_HEADER'
         58        SEND_VAL_EX                                              ~49
         59        SEND_VAL_EX                                              0
         60        DO_FCALL                                      0          
   31    61        INIT_FCALL_BY_NAME                                       'curl_exec'
         62        SEND_VAR_EX                                              !7
         63        DO_FCALL                                      0          
   32    64        INIT_FCALL_BY_NAME                                       'curl_close'
         65        SEND_VAR_EX                                              !7
         66        DO_FCALL                                      0          
   33    67        ASSIGN                                                   !8, 'testing+module'
   34    68        ASSIGN                                                   !9, 'This+is+a+%24var'
   35    69        ECHO                                                     !9
   37    70        ASSIGN                                                   !8, 'testing+module'
   38    71        NOP                                                      
         72        FAST_CONCAT                                      ~56     'This+is+a+', !8
         73        ASSIGN                                                   !9, ~56
   39    74        ECHO                                                     !9
   40    75        ASSIGN                                                   !10, <array>
   41    76        ASSIGN                                                   !0, 0
         77      > JMP                                                      ->81
   42    78    >   FETCH_DIM_R                                      ~60     !10, !0
         79        ASSIGN                                                   !11, ~60
   41    80        PRE_INC                                                  !0
         81    >   COUNT                                            ~63     !10
         82        IS_SMALLER                                               !0, ~63
         83      > JMPNZ                                                    ~64, ->78
   44    84    >   ECHO                                                     '%3Cpre%3E'
   45    85        INIT_FCALL                                               'print_r'
         86        SEND_VAR                                                 !11
         87        DO_ICALL                                                 
   46    88        ECHO                                                     '%3C%2Fpre%3E%3Cbr%2F%3E%0D%0A'
   48    89        ASSIGN                                                   !3, 3
   49    90        ECHO                                                     '%24a%0D%0A'
   50    91        ECHO                                                     '%24a%0D%0A'
   51    92        NOP                                                      
         93        FAST_CONCAT                                      ~67     !3, '%0D%0A'
         94        ECHO                                                     ~67
   52    95        NOP                                                      
         96        FAST_CONCAT                                      ~68     !3, '%0D%0A'
         97        ECHO                                                     ~68
   53    98        ASSIGN                                                   !12, <array>
   64    99        INIT_FCALL                                               'displayarray'
        100        SEND_VAR                                                 !12
        101        DO_FCALL                                      0          
   65   102        ECHO                                                     16
   66   103      > 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/rG1rJ
function name:  DisplayArray
number of ops:  14
compiled vars:  !0 = $array, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   54     0  E >   RECV                                             !0      
   55     1      > FE_RESET_R                                       $2      !0, ->12
          2    > > FE_FETCH_R                                               $2, !1, ->12
   56     3    >   TYPE_CHECK                                  128          !1
          4      > JMPZ                                                     ~3, ->9
   57     5    >   INIT_FCALL_BY_NAME                                       'DisplayArray'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
          8      > JMP                                                      ->11
   59     9    >   CONCAT                                           ~5      !1, '%0A'
         10        ECHO                                                     ~5
   55    11    > > JMP                                                      ->2
         12    >   FE_FREE                                                  $2
   63    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/rG1rJ
function name:  clsNAme
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   FETCH_THIS                                       ~0      
          1        GET_CLASS                                        ~1      ~0
          2        ECHO                                                     ~1
   20     3      > RETURN                                                   null

End of function clsname

End of class Insurance.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.89 ms | 1411 KiB | 18 Q