3v4l.org

run code in 300+ PHP versions simultaneously
<?php $in = '“Chess helps us overcome difficulties and sufferings,” said Unnikrishnan, taking my queen. “On a chess board you are fighting. as we are also fighting the hardships in our daily life.” he said.'; $out = preg_split('/ (?=“)/', $in, 0, PREG_SPLIT_NO_EMPTY); //$out = preg_match_all('/“.+?(?= “|$)/', $in, $out) ? $out[0] : null; $find = '/[“”]/u'; // unicode flag is essential $replace = '"'; $out = preg_replace($find, $replace, $out); // replace curly quotes with standard double quotes var_export($out);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/napTp
function name:  (null)
number of ops:  20
compiled vars:  !0 = $in, !1 = $out, !2 = $find, !3 = $replace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%E2%80%9CChess+helps+us+overcome+difficulties+and+sufferings%2C%E2%80%9D+said+Unnikrishnan%2C+taking+my+queen.+%E2%80%9COn+a+chess+board+you+are+fighting.+as+we+are+also+fighting+the+hardships+in+our+daily+life.%E2%80%9D+he+said.'
    5     1        INIT_FCALL                                               'preg_split'
          2        SEND_VAL                                                 '%2F+%28%3F%3D%E2%80%9C%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 1
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    8     8        ASSIGN                                                   !2, '%2F%5B%E2%80%9C%E2%80%9D%5D%2Fu'
    9     9        ASSIGN                                                   !3, '%22'
   10    10        INIT_FCALL                                               'preg_replace'
         11        SEND_VAR                                                 !2
         12        SEND_VAR                                                 !3
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !1, $9
   12    16        INIT_FCALL                                               'var_export'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.12 ms | 1012 KiB | 16 Q