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/rrDQk
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'dotest'
          1        SEND_VAL                                                 'test'
          2        DO_FCALL                                      0          
   12     3        INIT_FCALL                                               'dotest'
          4        SEND_VAL                                                 'test+and'
          5        DO_FCALL                                      0          
   13     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/rrDQk
function name:  dotest
number of ops:  27
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        SEND_VAR                                                 !0
          4        SEND_VAL                                                 2
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    5     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    7    10        INIT_FCALL                                               'explode'
         11        SEND_VAL                                                 '+'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 2
         14        DO_ICALL                                         $7      
         15        FETCH_LIST_R                                     $8      $7, 0
         16        ASSIGN                                                   !2, $8
         17        FETCH_LIST_R                                     $10     $7, 1
         18        ASSIGN                                                   !3, $10
         19        FREE                                                     $7
    8    20        ROPE_INIT                                     5  ~13     '%3E+%27'
         21        ROPE_ADD                                      1  ~13     ~13, !2
         22        ROPE_ADD                                      2  ~13     ~13, '%27+%2C+%27'
         23        ROPE_ADD                                      3  ~13     ~13, !3
         24        ROPE_END                                      4  ~12     ~13, '%27+%0A'
         25        ECHO                                                     ~12
    9    26      > RETURN                                                   null

End of function dotest

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.8 ms | 1399 KiB | 20 Q