3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '39&nbsp;999'; echo str_replace( '&nbsp;', '', $s ); echo PHP_EOL; echo preg_replace( // убираем все что НЕ цифры, // так как &nbsp; декодируется // НЕ в пробел, а другую сущность '/\D+/', '', html_entity_decode($s) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g36An
function name:  (null)
number of ops:  18
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '39%26nbsp%3B999'
    4     1        INIT_FCALL                                               'str_replace'
    5     2        SEND_VAL                                                 '%26nbsp%3B'
    6     3        SEND_VAL                                                 ''
    7     4        SEND_VAR                                                 !0
    4     5        DO_ICALL                                         $2      
    7     6        ECHO                                                     $2
   11     7        ECHO                                                     '%0A'
   13     8        INIT_FCALL                                               'preg_replace'
   17     9        SEND_VAL                                                 '%2F%5CD%2B%2F'
   18    10        SEND_VAL                                                 ''
   19    11        INIT_FCALL                                               'html_entity_decode'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $3      
         14        SEND_VAR                                                 $3
   13    15        DO_ICALL                                         $4      
   19    16        ECHO                                                     $4
   20    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.74 ms | 1011 KiB | 16 Q