3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dotest($s) { $a = explode( ' ', $s . ' ', 2); var_dump($a); list($x,$y) = explode( ' ', $s . ' ', 2); echo "> '$x' , '$y' \n"; } dotest('test'); dotest('test and'); dotest('test and last');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lft9q
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'dotest'
          1        SEND_VAL                                                 'test'
          2        DO_FCALL                                      0          
   11     3        INIT_FCALL                                               'dotest'
          4        SEND_VAL                                                 'test+and'
          5        DO_FCALL                                      0          
   12     6        INIT_FCALL                                               'dotest'
          7        SEND_VAL                                                 'test+and+last'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function dotest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lft9q
function name:  dotest
number of ops:  29
compiled vars:  !0 = $s, !1 = $a, !2 = $x, !3 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        CONCAT                                           ~4      !0, '+'
          4        SEND_VAL                                                 ~4
          5        SEND_VAL                                                 2
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    5     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
    6    11        INIT_FCALL                                               'explode'
         12        SEND_VAL                                                 '+'
         13        CONCAT                                           ~8      !0, '+'
         14        SEND_VAL                                                 ~8
         15        SEND_VAL                                                 2
         16        DO_ICALL                                         $9      
         17        FETCH_LIST_R                                     $10     $9, 0
         18        ASSIGN                                                   !2, $10
         19        FETCH_LIST_R                                     $12     $9, 1
         20        ASSIGN                                                   !3, $12
         21        FREE                                                     $9
    7    22        ROPE_INIT                                     5  ~15     '%3E+%27'
         23        ROPE_ADD                                      1  ~15     ~15, !2
         24        ROPE_ADD                                      2  ~15     ~15, '%27+%2C+%27'
         25        ROPE_ADD                                      3  ~15     ~15, !3
         26        ROPE_END                                      4  ~14     ~15, '%27+%0A'
         27        ECHO                                                     ~14
    8    28      > RETURN                                                   null

End of function dotest

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.82 ms | 1399 KiB | 20 Q