3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = []; public function baz() { if (false !== $this->bar[0] = set(11)) { echo 'YES!'; } } } $foo = new Foo; $foo->baz(); function set($param) { if ($param > 10) { return $param; } return false; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hNhFm
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'baz'
          4        DO_FCALL                                      0          
   25     5      > RETURN                                                   1

Function set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hNhFm
function name:  set
number of ops:  6
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        IS_SMALLER                                               10, !0
          2      > JMPZ                                                     ~1, ->4
   21     3    > > RETURN                                                   !0
   24     4    > > RETURN                                                   <false>
   25     5*     > RETURN                                                   null

End of function set

Class Foo:
Function baz:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/hNhFm
function name:  baz
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL_BY_NAME                                       'set'
          1        SEND_VAL_EX                                              11
          2        DO_FCALL                                      0  $2      
          3        FETCH_OBJ_W                                      $0      'bar'
          4        ASSIGN_DIM                                       ~1      $0, 0
          5        OP_DATA                                                  $2
          6        TYPE_CHECK                                  1018          ~1
          7      > JMPZ                                                     ~3, ->9
   10     8    >   ECHO                                                     'YES%21'
   12     9    > > RETURN                                                   null

End of function baz

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.96 ms | 1395 KiB | 13 Q