3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/url\([\'\"](.+)[\'\"]\)/'; $string ="background:#FFFFFF url('/assets/master/awards/honorcarosel.jpg') no-repeat; height:120px!important; min-height:120px;"; echo (int)preg_match( $pattern, $sample, $matches).PHP_EOL; print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lp0PP
function name:  (null)
number of ops:  14
compiled vars:  !0 = $pattern, !1 = $string, !2 = $sample, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Furl%5C%28%5B%27%5C%22%5D%28.%2B%29%5B%27%5C%22%5D%5C%29%2F'
    3     1        ASSIGN                                                   !1, 'background%3A%23FFFFFF+url%28%27%2Fassets%2Fmaster%2Fawards%2Fhonorcarosel.jpg%27%29+no-repeat%3B+height%3A120px%21important%3B+min-height%3A120px%3B'
    5     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !2
          5        SEND_REF                                                 !3
          6        DO_ICALL                                         $6      
          7        CAST                                          4  ~7      $6
          8        CONCAT                                           ~8      ~7, '%0A'
          9        ECHO                                                     ~8
    6    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.63 ms | 1394 KiB | 17 Q