3v4l.org

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

End of function clsname

End of class Insurance.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.59 ms | 1411 KiB | 18 Q