3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(); function blaat() { global $a; return $a['foo'] = "bar"; } print blaat()."\n"; print_r($a);
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Q2dBm
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, <array>
   6     1        NOP                                                      
  11     2        INIT_FCALL                                               'blaat'
         3        DO_FCALL                                      0  $2      
         4        CONCAT                                           ~3      $2, '%0A'
         5        ECHO                                                     ~3
  12     6        INIT_FCALL                                               'print_r'
         7        SEND_VAR                                                 !0
         8        DO_ICALL                                                 
         9      > RETURN                                                   1

Function blaat:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Q2dBm
function name:  blaat
number of ops:  5
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   7     0  E >   BIND_GLOBAL                                              !0, 'a'
   8     1        ASSIGN_DIM                                       $1      !0, 'foo'
         2        OP_DATA                                                  'bar'
         3      > RETURN                                                   $1
   9     4*     > RETURN                                                   null

End of function blaat

Generated using Vulcan Logic Dumper, using php 7.2.0