Summary
sscanf() must support standard float scan conversions %e, %E, %f, %F, and %g per php-src formatted_io.c.
This compiler rejects %e / %g with:
ValueError: Bad scan conversion character "e"
Repro
php test/repro/maintainer_gap_sscanf_float_conversions.php # Zend: exit 0
./script/docker-exec.sh -- php bin/vm.php test/repro/maintainer_gap_sscanf_float_conversions.php
Zend: sscanf('1.5e2', '%e', $f) → $f === 150.0; sscanf('3.14', '%g', $g) → $g ≈ 3.14.
This compiler: fatal ValueError on first %e pattern.
php-src reference
ext/standard/formatted_io.c — php_sscanf_internal() float conversions
ext/standard/sscanf.c
Implementation (PHP-in-PHP)
Done when (php-src-strict)
Related: #4512, #9325, #9560, #9536, #9134.
Refs #1492
Summary
sscanf()must support standard float scan conversions%e,%E,%f,%F, and%gper php-srcformatted_io.c.This compiler rejects
%e/%gwith:Repro
php test/repro/maintainer_gap_sscanf_float_conversions.php # Zend: exit 0 ./script/docker-exec.sh -- php bin/vm.php test/repro/maintainer_gap_sscanf_float_conversions.phpZend:
sscanf('1.5e2', '%e', $f)→$f === 150.0;sscanf('3.14', '%g', $g)→$g ≈ 3.14.This compiler: fatal
ValueErroron first%epattern.php-src reference
ext/standard/formatted_io.c—php_sscanf_internal()float conversionsext/standard/sscanf.cImplementation (PHP-in-PHP)
ext/standard/VmSscanf.php— add%e/%g/%fparsing (scientific + fixed); share float parsing with%Fif present.runtime/).Done when (php-src-strict)
php bin/vm.php test/repro/maintainer_gap_sscanf_float_conversions.phpexits 0.%doverflow/saturation behavior remains covered by Stdlib: sscanf() %d overflow must saturate to PHP_INT_MAX not TypeError (ext/standard/formatted_io.c) #9536.Related: #4512, #9325, #9560, #9536, #9134.
Refs #1492