3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "This is a string with 'single quotes' and " . '"double quotes" in it.'; echo $text."\n"; echo str_replace('"',"'",$text)."\n"; echo htmlentities($text,ENT_QUOTES); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V8G4n
function name:  (null)
number of ops:  16
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'This+is+a+string+with+%27single+quotes%27+and+%22double+quotes%22%0Ain+it.'
    4     1        CONCAT                                           ~2      !0, '%0A'
          2        ECHO                                                     ~2
    5     3        INIT_FCALL                                               'str_replace'
          4        SEND_VAL                                                 '%22'
          5        SEND_VAL                                                 '%27'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        CONCAT                                           ~4      $3, '%0A'
          9        ECHO                                                     ~4
    6    10        INIT_FCALL                                               'htmlentities'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 3
         13        DO_ICALL                                         $5      
         14        ECHO                                                     $5
    7    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.39 ms | 1394 KiB | 17 Q