3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = "foo\n"; echo preg_match("~^[a-z]+$~", $t, $m) . "\n"; echo "\"{$m[0]}\"";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fX1j2
function name:  (null)
number of ops:  14
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        ROPE_INIT                                     3  ~7      '%22'
          9        FETCH_DIM_R                                      ~5      !1, 0
         10        ROPE_ADD                                      1  ~7      ~7, ~5
         11        ROPE_END                                      2  ~6      ~7, '%22'
         12        ECHO                                                     ~6
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.16 ms | 1394 KiB | 15 Q