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

End of function clsname

End of class Insurance.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.61 ms | 1411 KiB | 18 Q