3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = '+421917982116'; $haveNumberPlus = strpos($number, '+'); var_dump(!$haveNumberPlus); if (!$haveNumberPlus === false) { echo number_format((int)$number, 0, ' ', ' '); } echo '+' . number_format((int)$number, 0, ' ', ' ');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/e1CvY
function name:  (null)
number of ops:  31
compiled vars:  !0 = $number, !1 = $haveNumberPlus
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2B421917982116'
    4     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%2B'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    5     6        INIT_FCALL                                               'var_dump'
          7        BOOL_NOT                                         ~5      !1
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                                 
    6    10        BOOL_NOT                                         ~7      !1
         11        TYPE_CHECK                                    4          ~7
         12      > JMPZ                                                     ~8, ->21
    7    13    >   INIT_FCALL                                               'number_format'
         14        CAST                                          4  ~9      !0
         15        SEND_VAL                                                 ~9
         16        SEND_VAL                                                 0
         17        SEND_VAL                                                 '+'
         18        SEND_VAL                                                 '+'
         19        DO_ICALL                                         $10     
         20        ECHO                                                     $10
   10    21    >   INIT_FCALL                                               'number_format'
         22        CAST                                          4  ~11     !0
         23        SEND_VAL                                                 ~11
         24        SEND_VAL                                                 0
         25        SEND_VAL                                                 '+'
         26        SEND_VAL                                                 '+'
         27        DO_ICALL                                         $12     
         28        CONCAT                                           ~13     '%2B', $12
         29        ECHO                                                     ~13
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.17 ms | 1395 KiB | 19 Q