3v4l.org

run code in 300+ PHP versions simultaneously
<?php $argv[1] = "-00010.1"; if('-'==($_=$argv[1])[0])$s=1||$_[0]=0; echo strlen(explode('.',$t=trim($_,0))[1]).($_!==$t?' '.($s?'-':'').(float)$t:''); exit;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 30
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 30
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 8
filename:       /in/f5iA1
function name:  (null)
number of ops:  35
compiled vars:  !0 = $argv, !1 = $_, !2 = $s, !3 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 1
          1        OP_DATA                                                  '-00010.1'
    5     2        FETCH_DIM_R                                      ~5      !0, 1
          3        ASSIGN                                           ~6      !1, ~5
          4        FETCH_DIM_R                                      ~7      ~6, 0
          5        IS_EQUAL                                                 ~7, '-'
          6      > JMPZ                                                     ~8, ->8
          7    >   ASSIGN                                                   !2, <true>
    6     8    >   INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '.'
         10        INIT_FCALL                                               'trim'
         11        SEND_VAR                                                 !1
         12        SEND_VAL                                                 0
         13        DO_ICALL                                         $10     
         14        ASSIGN                                           ~11     !3, $10
         15        SEND_VAL                                                 ~11
         16        DO_ICALL                                         $12     
         17        FETCH_DIM_R                                      ~13     $12, 1
         18        STRLEN                                           ~14     ~13
         19        IS_NOT_IDENTICAL                                         !1, !3
         20      > JMPZ                                                     ~15, ->30
         21    > > JMPZ                                                     !2, ->24
         22    >   QM_ASSIGN                                        ~16     '-'
         23      > JMP                                                      ->25
         24    >   QM_ASSIGN                                        ~16     ''
         25    >   CONCAT                                           ~17     '+', ~16
         26        CAST                                          5  ~18     !3
         27        CONCAT                                           ~19     ~17, ~18
         28        QM_ASSIGN                                        ~20     ~19
         29      > JMP                                                      ->31
         30    >   QM_ASSIGN                                        ~20     ''
         31    >   CONCAT                                           ~21     ~14, ~20
         32        ECHO                                                     ~21
    7    33      > EXIT                                                     
         34*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.82 ms | 941 KiB | 18 Q