3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* the default gc root size is 10,000 */ for ($i=0; $i<9998; $i++) { $array = array(); $array[0] = &$array; unset($array); } $matches = array("foo" => "bar"); /* this bucket will trigger the segfault */ $dummy = array("dummy"); /* used to trigger gc_collect_cycles */ $dummy[1] = &$dummy; $matches[1] = &$matches; $matches[2] = $dummy; preg_match_all("/(\d)+/", "foo123456bar", $matches); echo "okey";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
Branch analysis from position: 2
filename:       /in/M8Eha
function name:  (null)
number of ops:  24
compiled vars:  !0 = $i, !1 = $array, !2 = $matches, !3 = $dummy
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->7
    4     2    >   ASSIGN                                                   !1, <array>
    5     3        FETCH_DIM_W                                      $6      !1, 0
          4        ASSIGN_REF                                               $6, !1
    6     5        UNSET_CV                                                 !1
    3     6        PRE_INC                                                  !0
          7    >   IS_SMALLER                                               !0, 9998
          8      > JMPNZ                                                    ~9, ->2
    9     9    >   ASSIGN                                                   !2, <array>
   10    10        ASSIGN                                                   !3, <array>
   11    11        FETCH_DIM_W                                      $12     !3, 1
         12        ASSIGN_REF                                               $12, !3
   13    13        FETCH_DIM_W                                      $14     !2, 1
         14        ASSIGN_REF                                               $14, !2
   14    15        ASSIGN_DIM                                               !2, 2
         16        OP_DATA                                                  !3
   16    17        INIT_FCALL                                               'preg_match_all'
         18        SEND_VAL                                                 '%2F%28%5Cd%29%2B%2F'
         19        SEND_VAL                                                 'foo123456bar'
         20        SEND_REF                                                 !2
         21        DO_ICALL                                                 
   17    22        ECHO                                                     'okey'
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.58 ms | 1395 KiB | 15 Q