متنوعات
الفصل السادس
نتيجة المثال :
http://localhost/test/p7/new7- Microsoft Inter LDX
vorites Tools Help
Stop Refresh Home
Search
http://localhost/test/p7/new?
Go
Links
Edit
Back
Address
Result: This is a string
Result: This is a string with some more text
Result This is a string with some more text and a newline at the end.
Result :
Number: 9
Result :
Number: $num
Result: This is a test.
Result : T
Result This is still a test. Result
1 Done
<?php
// String conversion
تحويلات السلاسل النصية //
Local intranet
бходжкі
veraux sans
*****
chicago
مثال تحويلات السلاسل النصية :
$foo = 1 + "10.5"; echo "\$foo==$foo; type is $foo = 1 + "-1.3e3"; echo "\$foo==$f00; type is $foo 1+"bob-1.3e3";
=
11
// $foo is double (11.5)
gettype ($foo). "<br>\n"; // $foo is double (-1299) gettype ($foo). "<br>\n"; // $foo is integer (1)
echo "\$foo==$foo; type is ". gettype ($foo). "<br>\n";
$foo = 1 + "bob3";
11
// $foo is integer (1)
echo "\$foo==$foo; type is gettype ($foo). "<br>\n"; $foo = 1 + "10 Small Pigs"; // $foo is integer (11) echo "\$foo==$foo; type is ". gettype ($foo). "<br>\n"; $foo = 1 + "10 Little Piggies"; // $foo is integer (11) echo "\$foo==$foo; type is ". gettype ($foo). "<br>\n"; $foo = "10.0 pigs + 1; // $foo is integer (11)
11
۲۰۳
ص ٢٠٣