3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { private $name = 'John'; } $objects = new SplObjectStorage; $person = new Person; $objects->attach($person, 'test'); if($objects->contains($person)) { $objects->offsetGet($person)->getInfo(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/QUk0o
function name:  (null)
number of ops:  20
compiled vars:  !0 = $objects, !1 = $person
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $2      'SplObjectStorage'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    8     3        NEW                                              $5      'Person'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   10     6        INIT_METHOD_CALL                                         !0, 'attach'
          7        SEND_VAR_EX                                              !1
          8        SEND_VAL_EX                                              'test'
          9        DO_FCALL                                      0          
   12    10        INIT_METHOD_CALL                                         !0, 'contains'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0  $9      
         13      > JMPZ                                                     $9, ->19
   13    14    >   INIT_METHOD_CALL                                         !0, 'offsetGet'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0  $10     
         17        INIT_METHOD_CALL                                         $10, 'getInfo'
         18        DO_FCALL                                      0          
   14    19    > > RETURN                                                   1

Class Person: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.07 ms | 1393 KiB | 13 Q