3v4l.org

run code in 300+ PHP versions simultaneously
<?php $field_from_db = 'Hello How are you :slight_smile::joy::_do_not_match:test test::'; $regex = '/:[a-z0-9]+(?:[-’_][a-z0-9]+)*:/i'; preg_match_all($regex, $field_from_db, $matches); var_export($matches[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HN7bd
function name:  (null)
number of ops:  12
compiled vars:  !0 = $field_from_db, !1 = $regex, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Hello+How+are+you+%3Aslight_smile%3A%3Ajoy%3A%3A_do_not_match%3Atest+test%3A%3A'
    4     1        ASSIGN                                                   !1, '%2F%3A%5Ba-z0-9%5D%2B%28%3F%3A%5B-%E2%80%99_%5D%5Ba-z0-9%5D%2B%29%2A%3A%2Fi'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'var_export'
          8        FETCH_DIM_R                                      ~6      !2, 0
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.63 ms | 997 KiB | 15 Q