3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TEXT >num, blah, blah, blah ATCGACTGAATCGA >num, blah, blah, blah ATCGATCGATCGATCG >num, blah, blah, blah ATCGATCGATCGATCG TEXT; echo preg_replace_callback( "~^>\Knum~m", function () { static $counter = 0; return ++$counter; }, $text );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F8OjF
function name:  (null)
number of ops:  9
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Enum%2C+blah%2C+blah%2C+blah%0A%0AATCGACTGAATCGA%0A%0A%3Enum%2C+blah%2C+blah%2C+blah%0A%0AATCGATCGATCGATCG%0A%0A%3Enum%2C+blah%2C+blah%2C+blah%0A%0AATCGATCGATCGATCG'
   17     1        INIT_FCALL                                               'preg_replace_callback'
   18     2        SEND_VAL                                                 '%7E%5E%3E%5CKnum%7Em'
   19     3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   22     4        SEND_VAL                                                 ~2
   23     5        SEND_VAR                                                 !0
   17     6        DO_ICALL                                         $3      
   23     7        ECHO                                                     $3
   24     8      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F8OjF
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $counter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   BIND_STATIC                                              !0
   21     1        PRE_INC                                          ~1      !0
          2      > RETURN                                                   ~1
   22     3*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.46 ms | 1432 KiB | 14 Q