3v4l.org

run code in 500+ 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 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h8pss
function name:  __wakeup
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   FETCH_THIS                                           ~0      
          1        FRAMELESS_ICALL_2                property_exists      ~1      ~0, 'n1ame'
          2      > JMPZ                                                         ~1, ->7
   10     3    >   NEW                                                  $2      'Exception'
          4        SEND_VAL_EX                                                  'oh+no+this+data+is+bad'
          5        DO_FCALL                                          0          
          6      > THROW                                             0          $2
   12     7    > > RETURN                                                       null

End of function __wakeup

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.31 ms | 2050 KiB | 14 Q