3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public $name; public function __wakeup() { if( property_exists( $this, 'n1ame' ) ) { throw new Exception('oh no this data is bad'); } } } try { unserialize('O:6:"Person":1:{s:5:"n1ame";s:4:"mark";}'); } catch( Exception $e ) { echo 'nope cant unserialize it: ' . $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h8pss
function name:  (null)
number of ops:  10
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'unserialize'
          1        SEND_VAL                                                 'O%3A6%3A%22Person%22%3A1%3A%7Bs%3A5%3A%22n1ame%22%3Bs%3A4%3A%22mark%22%3B%7D'
          2        DO_ICALL                                                 
          3      > JMP                                                      ->9
   19     4  E > > CATCH                                       last         'Exception'
   21     5    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          6        DO_FCALL                                      0  $2      
          7        CONCAT                                           ~3      'nope+cant+unserialize+it%3A+', $2
          8        ECHO                                                     ~3
   22     9    > > RETURN                                                   1

Class Person:
Function __wakeup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h8pss
function name:  __wakeup
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'property_exists'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        SEND_VAL                                                 'n1ame'
          4        DO_ICALL                                         $1      
          5      > JMPZ                                                     $1, ->10
   10     6    >   NEW                                              $2      'Exception'
          7        SEND_VAL_EX                                              'oh+no+this+data+is+bad'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $2
   12    10    > > RETURN                                                   null

End of function __wakeup

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
222 ms | 1002 KiB | 15 Q