3v4l.org

run code in 300+ PHP versions simultaneously
<?php //define an error handler function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, $errno, 0, $errfile, $errline); } //set ur error handle set_error_handler("exception_error_handler"); final class valueobjectEmail { const EMAIL = "me@where.com"; static $p = "me@here.com"; // can't unset static property private $pp = "me@there.org"; // but may unset ppp properties function getProp(){ return valueobjectEmail::$p; } function setProp(){ valueobjectEmail::$p = 'blee'; } function getPropPP(){ return $this->pp; } function UnsetPP() { unset($this->pp); } private function __destruct() { return false; } } $vo = new valueobjectEmail; var_dump($vo); echo $vo->getProp(),"\n"; $vo->setProp(); echo $vo->getProp(),"\n"; $vo2 = new valueobjectEmail; echo $vo == $vo2,"\n"; echo $vo === $vo2,"\n"; echo "\n",$vo2->getPropPP(),"\n"; $vo2->UnsetPP(); var_dump($vo2); echo $vo::EMAIL,"\n"; try { $vo = null; } catch(Exception $e) { } finally { echo "You may not destroy the value object","\n"; } var_dump($vo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 162) Position 1 = 47, Position 2 = 46
Branch analysis from position: 47
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 44
Branch analysis from position: 44
2 jumps found. (Code = 107) Position 1 = 45, Position 2 = -2
Branch analysis from position: 45
filename:       /in/EuBbI
function name:  (null)
number of ops:  54
compiled vars:  !0 = $vo, !1 = $vo2, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'exception_error_handler'
          2        DO_ICALL                                                 
   34     3        NEW                                              $4      'valueobjectEmail'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $4
   35     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   37     9        INIT_METHOD_CALL                                         !0, 'getProp'
         10        DO_FCALL                                      0  $8      
         11        ECHO                                                     $8
         12        ECHO                                                     '%0A'
   38    13        INIT_METHOD_CALL                                         !0, 'setProp'
         14        DO_FCALL                                      0          
   39    15        INIT_METHOD_CALL                                         !0, 'getProp'
         16        DO_FCALL                                      0  $10     
         17        ECHO                                                     $10
         18        ECHO                                                     '%0A'
   41    19        NEW                                              $11     'valueobjectEmail'
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !1, $11
   42    22        IS_EQUAL                                         ~14     !0, !1
         23        ECHO                                                     ~14
         24        ECHO                                                     '%0A'
   43    25        IS_IDENTICAL                                     ~15     !0, !1
         26        ECHO                                                     ~15
         27        ECHO                                                     '%0A'
   45    28        ECHO                                                     '%0A'
         29        INIT_METHOD_CALL                                         !1, 'getPropPP'
         30        DO_FCALL                                      0  $16     
         31        ECHO                                                     $16
         32        ECHO                                                     '%0A'
   46    33        INIT_METHOD_CALL                                         !1, 'UnsetPP'
         34        DO_FCALL                                      0          
   47    35        INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !1
         37        DO_ICALL                                                 
   48    38        FETCH_CLASS                                   0  $19     !0
         39        FETCH_CLASS_CONSTANT                             ~20     $19, 'EMAIL'
         40        ECHO                                                     ~20
         41        ECHO                                                     '%0A'
   50    42        ASSIGN                                                   !0, null
         43      > JMP                                                      ->45
   51    44  E > > CATCH                                       last         'Exception'
   53    45    > > FAST_CALL                                                ->47
         46    > > JMP                                                      ->50
   54    47    >   ECHO                                                     'You+may+not+destroy+the+value+object'
         48        ECHO                                                     '%0A'
         49      > FAST_RET                                                 
   56    50    >   INIT_FCALL                                               'var_dump'
         51        SEND_VAR                                                 !0
         52        DO_ICALL                                                 
         53      > RETURN                                                   1

Function exception_error_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/EuBbI
function name:  exception_error_handler
number of ops:  13
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    6     4        NEW                                              $4      'ErrorException'
          5        SEND_VAR_EX                                              !1
          6        SEND_VAR_EX                                              !0
          7        SEND_VAL_EX                                              0
          8        SEND_VAR_EX                                              !2
          9        SEND_VAR_EX                                              !3
         10        DO_FCALL                                      0          
         11      > THROW                                         0          $4
    7    12*     > RETURN                                                   null

End of function exception_error_handler

Class valueobjectEmail:
Function getprop:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EuBbI
function name:  getProp
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'p'
          1      > RETURN                                                   ~0
   20     2*     > RETURN                                                   null

End of function getprop

Function setprop:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EuBbI
function name:  setProp
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ASSIGN_STATIC_PROP                                       'p', 'valueobjectEmail'
          1        OP_DATA                                                  'blee'
   23     2      > RETURN                                                   null

End of function setprop

Function getproppp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EuBbI
function name:  getPropPP
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   FETCH_OBJ_R                                      ~0      'pp'
          1      > RETURN                                                   ~0
   26     2*     > RETURN                                                   null

End of function getproppp

Function unsetpp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EuBbI
function name:  UnsetPP
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   UNSET_OBJ                                                'pp'
   29     1      > RETURN                                                   null

End of function unsetpp

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EuBbI
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E > > RETURN                                                   <false>
   32     1*     > RETURN                                                   null

End of function __destruct

End of class valueobjectEmail.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.21 ms | 1404 KiB | 17 Q