3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __toString() { return 'a'; } } $a = new Foo(); $b = new Foo(); $list = [$a, $b]; natcasesort($list); print_r($list);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/msYeu
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $b, !2 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'foo'
   11     1        NEW                                              $3      'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   12     4        NEW                                              $6      'Foo'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
   14     7        INIT_ARRAY                                       ~9      !0
          8        ADD_ARRAY_ELEMENT                                ~9      !1
          9        ASSIGN                                                   !2, ~9
   16    10        INIT_FCALL                                               'natcasesort'
         11        SEND_REF                                                 !2
         12        DO_ICALL                                                 
   18    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class Foo:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/msYeu
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'a'
    8     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.63 ms | 1395 KiB | 17 Q