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/FOB3S
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/FOB3S
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        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        BEGIN_SILENCE                                    ~7      
         11        INIT_FCALL                                               'explode'
         12        SEND_VAL                                                 '+'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 2
         15        DO_ICALL                                         $8      
         16        FETCH_LIST_R                                     $9      $8, 0
         17        ASSIGN                                                   !2, $9
         18        FETCH_LIST_R                                     $11     $8, 1
         19        ASSIGN                                                   !3, $11
         20        END_SILENCE                                              ~7
         21        FREE                                                     $8
    8    22        ROPE_INIT                                     5  ~14     '%3E+%27'
         23        ROPE_ADD                                      1  ~14     ~14, !2
         24        ROPE_ADD                                      2  ~14     ~14, '%27+%2C+%27'
         25        ROPE_ADD                                      3  ~14     ~14, !3
         26        ROPE_END                                      4  ~13     ~14, '%27+%0A'
         27        ECHO                                                     ~13
    9    28      > RETURN                                                   null

End of function dotest

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.73 ms | 939 KiB | 21 Q