3v4l.org

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

End of function clsname

End of class Insurance.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.34 ms | 1411 KiB | 18 Q