3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T { private $allowed = 0; function __destruct() { if ($this->allowed == 1) echo "SUCCESS"; } }; $a = T(); print($a); //$data = 'O:1:"T":2:{s:10:"Tallowed";i:1;s:10:"Tallowen";i:1;}'; var_dump(unserialize($data)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0v5P5
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL_BY_NAME                                       'T'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
    9     3        ECHO                                                     !0
   12     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'unserialize'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
   14    10      > RETURN                                                   1

Class T:
Function __destruct:
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
filename:       /in/0v5P5
function name:  __destruct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_OBJ_R                                      ~0      'allowed'
          1        IS_EQUAL                                                 ~0, 1
          2      > JMPZ                                                     ~1, ->4
          3    >   ECHO                                                     'SUCCESS'
          4    > > RETURN                                                   null

End of function __destruct

End of class T.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.88 ms | 1395 KiB | 17 Q