3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = "foo\n"; echo preg_match("~^[a-z]+$~", $t, $m) . "\n"; echo strlen($m[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BJdoU
function name:  (null)
number of ops:  12
compiled vars:  !0 = $t, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo%0A'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%7E%5E%5Ba-z%5D%2B%24%7E'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $3      
          6        CONCAT                                           ~4      $3, '%0A'
          7        ECHO                                                     ~4
    5     8        FETCH_DIM_R                                      ~5      !1, 0
          9        STRLEN                                           ~6      ~5
         10        ECHO                                                     ~6
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.48 ms | 1394 KiB | 15 Q