1--TEST-- 2Test decoct() - basic function test decoct() 3--FILE-- 4<?php 5$values = array(10, 6 3950.5, 7 3.9505e3, 8 03, 9 0x5F, 10 "10", 11 "3950.5", 12 "3.9505e3", 13 "039", 14 "0x5F", 15 true, 16 false, 17 null, 18 ); 19 20foreach ($values as $value) { 21 try { 22 var_dump(decoct($value)); 23 } catch (TypeError $exception) { 24 echo $exception->getMessage() . "\n"; 25 } 26} 27 28?> 29--EXPECT-- 30string(2) "12" 31string(4) "7556" 32string(4) "7556" 33string(1) "3" 34string(3) "137" 35string(2) "12" 36string(4) "7556" 37string(4) "7556" 38string(2) "47" 39decoct(): Argument #1 ($num) must be of type int, string given 40string(1) "1" 41string(1) "0" 42string(1) "0" 43