3v4l.org

run code in 300+ PHP versions simultaneously
<?php class segfault { private static $id = 0; public $name; public function __construct() { self::$id++; $this->name = getclass.'-'.self::$id; } } function string_sfault($s) { echo $s.': '.strlen($s).PHP_EOL; } $stack = array(); for($i=0;$i<101;$i++) { $sf = new segfault(); $stack[] = $sf; string_sfault($sf); } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 3
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 3
Branch analysis from position: 14
Branch analysis from position: 3
filename:       /in/WA4tQ
function name:  (null)
number of ops:  15
compiled vars:  !0 = $stack, !1 = $i, !2 = $sf
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, <array>
   18     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->12
   19     3    >   NEW                                              $5      'segfault'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $5
   20     6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  !2
   21     8        INIT_FCALL                                               'string_sfault'
          9        SEND_VAR                                                 !2
         10        DO_FCALL                                      0          
   18    11        PRE_INC                                                  !1
         12    >   IS_SMALLER                                               !1, 101
         13      > JMPNZ                                                    ~11, ->3
   24    14    > > RETURN                                                   1

Function string_sfault:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WA4tQ
function name:  string_sfault
number of ops:  7
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        CONCAT                                           ~1      !0, '%3A+'
          2        STRLEN                                           ~2      !0
          3        CONCAT                                           ~3      ~1, ~2
          4        CONCAT                                           ~4      ~3, '%0A'
          5        ECHO                                                     ~4
   15     6      > RETURN                                                   null

End of function string_sfault

Class segfault:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WA4tQ
function name:  __construct
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   PRE_INC_STATIC_PROP                                      'id'
    9     1        FETCH_CONSTANT                                   ~2      'getclass'
          2        CONCAT                                           ~3      ~2, '-'
          3        FETCH_STATIC_PROP_R          unknown             ~4      'id'
          4        CONCAT                                           ~5      ~3, ~4
          5        ASSIGN_OBJ                                               'name'
          6        OP_DATA                                                  ~5
   10     7      > RETURN                                                   null

End of function __construct

End of class segfault.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.64 ms | 1390 KiB | 14 Q