doc:todo:undocumented

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

doc:todo:undocumented [2008/11/30 22:12]
kalle
doc:todo:undocumented [2017/09/22 13:28]
Line 1: Line 1:
-====== Undocumented stuff ====== 
-Feel free to document anything presented here. Entries linking to user notes have not been confirmed, so may or may not need documentations (or demonstrate real bugs) but they are worth exploring. 
- 
-===== PHP 6 ===== 
- 
-  * Binary and unicode string 
-<code php> 
-<?php 
- 
-$unicode = '傀傂两亨乄了乆刄'; 
-$binary  = b'傀傂两亨乄了乆刄'; 
-$binary2 = (binary) $unicode; 
-$binary3 = b<<<FOO 
-傀傂两亨乄了乆刄 
-FOO; 
- 
-echo strlen($unicode); 
-echo strlen($binary); 
-echo strlen($binary2); 
-echo strlen($binary3); 
- 
-?> 
-</code> 
- 
-  * Unicode escapes 
-<code php> 
-<?php  
- 
-// '\Uxxxxxx'  
-$str = 'U+123: \U000123';  
-// '\uxxxx'  
-$str = 'U+123: \u0123';  
-// unicode(8) "U+123: ģ" 
-var_dump($str); 
- 
-?> 
-</code> 
- 
-  * Normalization 
-<code php> 
-<?php 
- 
-$GLOBALS["\u212B"] = ' 승인 '; 
-// U+00C5 = Å 
-echo $GLOBALS["\u00C5"]; 
- 
-?> 
-</code> 
- 
-   * Session: Added ability to provide upload progress feedback through session data. See [[rfc:session_upload_progress]] 
- 
- 
- 
- 
- 
- 
- 
- 
-===== PHP 5.3 ===== 
-  * SPL classes: ArrayObject, CachingIterator, RecursiveCachingIterator, DirectoryIterator, FilterIterator, LimitIterator, ParentIterator, RecursiveDirectoryIterator, RecursiveIteratorIterator, SimpleXMLIterator 
- 
-  * ''goto'' 
-<code php> 
-<?php  
- 
-goto a; 
-print 'Foo'; 
- 
-a: 
-print 'Bar'; 
- 
-?> 
-</code> 
- 
-  * ''?:'' operator 
-<code php> 
-<?php  
- 
-var_dump(0 ?: 'Hello!'); // string(6) "Hello!" 
- 
-?> 
-</code> 
- 
-  * ''namespace::'' (alternative for ''%%__NAMESPACE__%%'') 
-<code php> 
-<?php  
- 
-namespace foo::bar; 
- 
-const bar = 2; 
- 
-function foo() { 
-    return 'foo!';     
-} 
- 
-var_dump(namespace::bar, namespace::foo()); 
-/* 
-int(2) 
-string(4) "foo!" 
-*/ 
-?> 
-</code> 
- 
-  * Override existing classes 
-<code php> 
-<?php 
- 
-namespace test; 
- 
-class foo { } 
- 
-use test::foo as stdClass; 
- 
-var_dump(new stdClass); 
-/* 
-object(test::foo)#1 (0) { 
-} 
-*/ 
-?> 
-</code> 
- 
-  * ''new static;'' 
-<code php> 
-<?php 
- 
-class bar { 
- public function show() { 
- var_dump(new static); 
- } 
-} 
- 
-class foo extends bar { 
- public function test() { 
- parent::show(); 
- } 
-} 
- 
-$foo = new foo; 
-$foo->test(); 
-$foo::test(); 
-/* 
-object(foo)#2 (0) { 
-} 
-object(bar)#2 (0) { 
-} 
-*/ 
-?> 
-</code> 
- 
-  * ''class_alias()'' function 
-<code php> 
-<?php 
- 
-class foo { } 
-class_alias('foo', 'bar'); 
- 
-var_dump(new bar); 
-/* 
-object(foo)#1 (0) { 
-} 
-*/ 
- 
-?> 
-</code> 
- 
-  * Heredoc with double quotes 
-<code php> 
-<?php 
- 
-print <<<"FOO" 
- Foobar! :) 
-FOO; 
- 
-?> 
-</code> 
- 
-  * user_ini.filename user-initialization mechanism and config variables: 
-user_ini.filename and user_ini.cache_ttl. 
- 
-  * [HOST=] and [PATH=] configuration sections in php.ini 
- 
-  * ''E_DEPRECATED'' 
- 
-  * zend_parse_parameters types: C, f, Z, h 
- 
-  * ''Closures'' 
- 
-===== PHP 5.x ==== 
- 
-  * Type hints: ''self'', ''parent'' and interfaces. 
-<code php> 
-<?php  
- 
-interface iTest { } 
- 
-class baz implements iTest {} 
- 
-class bar { } 
-  
-class foo extends bar { 
-    public function testFoo(self $obj) { 
-        var_dump($obj); 
-    } 
-    public function testBar(parent $obj) { 
-        var_dump($obj); 
-    } 
-    public function testBaz(iTest $obj) { 
-        var_dump($obj); 
-    } 
-} 
-  
-$foo = new foo; 
-$foo->testFoo(new foo); 
-$foo->testBar(new bar); 
-$foo->testBaz(new baz); 
-$foo->testFoo(new stdClass); // Catchable fatal error 
-  
-?> 
-</code> 
- 
-  * "Illegal" property name. 
-<code php> 
-<?php 
- 
-$foo = new stdClass; 
- 
-$foo->{'foo-bar'} = 'foo!'; 
- 
-var_dump($foo); 
-/* 
-object(stdClass)#1 (1) { 
-  ["foo-bar"]=> 
-  string(4) "foo!" 
-} 
-*/ 
-?> 
-</code> 
- 
- 
- 
- 
-===== Others ===== 
- 
-  * Trick for access private properties. ([[http://derickrethans.nl/private_properties_exposed.php|Article]]) 
-<code php> 
-<?php 
- 
-class foo { 
-    private $bar = 42; 
- 
-} 
- 
-$obj = new foo; 
-$propname="\0foo\0bar"; 
-$a = (array) $obj; 
-echo $a[$propname]; 
- 
-?> 
-</code> 
- 
-  * Its possible to use type casting after another type cast 
- 
-<code php> 
-<?php 
-class ToString 
-{ 
- public function __toString() 
- { 
- return "1337"; 
- } 
-} 
- 
-var_dump((int) (string) new ToString); 
-?> 
-</code> 
- 
-  * Casting an object to an array and back to an object changes the class to stdClass 
- 
-<code php> 
-<?php 
-class Test 
-{ 
- private $test; 
-} 
- 
-var_dump((object) (array) new Test); 
-?> 
-</code> 
- 
-  * ''$arr[]'' is allowed when passed by reference 
-<code php> 
-<?php 
- 
-function test(&$var) { } 
- 
-$arr = array(); 
-test($arr[]); 
- 
-?> 
-</code> 
- 
-===== Add example ===== 
- 
-  * //language.oop5.patterns//: Add more patterns example? 
-  * //function.xmlreader-isvalid//: Add example. 
-  * //function.dba-open//: Suggested example. ([[http://www.php.net/manual/en/function.dba-open.php#79370|note]]) 
- 
- 
-===== Add Reference ===== 
- 
-  * ''odbc_exec()'' - Missing information about ''$flags'' (//last parameter//). 
-  * ''mb_ereg_search_init'' - Missing list of options. (//php-src/ext/mbstring/oniguruma/doc/API//) 
- 
- 
- 
-===== Add Related Functions ("See also") ===== 
- 
- 
- 
-===== User Requests ===== 
- 
-===== Add INSTALL Information ===== 
-  * //fileinfo.installation//: "How to install fileinfo on Win32 (and Linux for that matter" ([[http://us3.php.net/manual/en/fileinfo.installation.php#82570|note]]) 
- 
-  * //enchant//: How to install enchant. 
- 
-  * //filter//: No longer (really) in PECL, so clarify this. 
- 
-  * //Windows//: There is a related TODO item [[http://markmail.org/message/c7hz3yycg4mvyje5|here]] 
- 
- 
-===== Errors/Aditional informations ===== 
- 
-  * //mysqli-autocommit//: "autocommit not only turns on/off transactions, but will also 'commit' any waiting queries." ([[http://www.php.net/manual/en/function.mysqli-autocommit.php#79103|note]]) 
- 
-  * //mysqli-report//: "are sent through an exception named 'mysqli_sql_exception' instead of a normal PHP warning." ([[http://www.php.net/manual/en/function.mysqli-report.php#79100|note]]) 
- 
-  * //pdf-begin-document//: "doesn't seem to be much documentation on setting options with this function, ... some basic things:" ([[http://www.php.net/manual/en/function.pdf-begin-document.php#79059|note]]) 
- 
-  * //function.curl-init//: "has undefined behavior if you pass 'false'" ([[http://www.php.net/manual/en/function.curl-init.php#78700|note]]) 
-  
-  * //function.dio-stat//: "This extension is only available on Windows Platforms as of PHP 5.0.0" ([[http://www.php.net/manual/en/function.dio-stat.php#78581|note]]) 
- 
-  * //ref.pdo//: //Example#5//: "We must change the last two lines to catch the error ..." ([[http://www.php.net/manual/en/ref.pdo.php#78532|note]]) 
- 
-  * //function.xmlwriter-write-element//: "The second argument ($content) is actually not optional..." ([[http://www.php.net/manual/en/function.xmlwriter-write-element.php#79989|note]]) 
- 
-  * //function.get-cfg-var//: "It seems that this function doesn't work on Unix Operating Systems." ([[http://www.php.net/manual/en/function.get-cfg-var.php#79953|note]]) 
- 
-  * //function.socket-read//: "On non-blocking connections it may not return full length requested." ([[http://www.php.net/manual/en/function.socket-read.php#79853|note]]) 
- 
-  * //function.imagickdraw-setfillalpha//: "setFillAlpha is deprecated use the replacement: setFillOpacity" ([[http://www.php.net/manual/en/function.imagickdraw-setfillalpha.php#79639|note]]) 
- 
-  * //function.disk-free-space//: "Note that disk_free_space() does an open_basedir check." ([[http://www.php.net/manual/en/function.disk-free-space.php#79648|note]]) 
- 
-  * //function.imagick-trimimage//: "This method requires ImageMagick version >= 6.2.8" ([[http://www.php.net/manual/en/function.imagick-trimimage.php#79638|note]]) 
- 
-  * //ref.soap//: "Do NOT use associative arrays or arrays not starting with element number 0..." ([[http://www.php.net/manual/en/ref.soap.php#79372|note]]) 
- 
-  * //function.Memcache-delete//: "Memcache::delete() does not return FALSE on failure, but seems to return FALSE when there is no object in cache with the specified key." 
- 
-  * //migration5.incompatible//: "As with array_merge(), array_merge_recursive() returns NULL in PHP 5 if a non-array parameter is passed to it." ([[http://www.php.net/manual/en/migration5.incompatible.php#79055|note]]) 
- 
-  * //function.version-compare//: "It should be noted that version_compare() considers 1 < 1.0 < 1.0.0 etc." ([[http://www.php.net/manual/en/function.version-compare.php#7884|note]]) 
- 
-  * //function.mcal-delete-event//: Current usage is: mcal_delete_event($stream [, $eventid] ); (user note) 
- 
-  * //function.mcal-fetch-event//: "Contrary to what the manual says, the End Date for recurance is not datetime recur_endate, it's object recur_enddate" (user note) 
- 
-  * //function.odbc-commit//: When used within an odbc_fetch_row() loop, your selected set is lost. (user note) 
- 
-  * //function.ftp-nlist//: You can do a wildcard file listing with ftp_nlist ([[http://www.php.net/manual/en/function.ftp-nlist.php#9583|note]]) 
- 
-  * //function.ftp-rawlist//: the second parameter accepts also standard arguments of /bin/ls command like "-l" or "-t" ([[http://www.php.net/manual/en/function.ftp-rawlist.php#13702|note]]) 
- 
-  * //function.curl-getinfo//: "There is a constant missing from that list.  CURLINFO_REDIRECT_COUNT will give you the number of redirects it went through if CURLOPT_FOLLOWLOCATION was set." ([[http://www.php.net/manual/en/function.curl-getinfo.php#80457|note]]) 
- 
-  * //function.shell-exec//: "If the return is empty, then command could not be executed or executed command returned an error." ([[http://www.php.net/manual/en/function.shell-exec.php#80446|note]]) 
- 
-  * //tokens//: "Undocumented constants/syntax/reference" ([[http://www.php.net/manual/en/tokens.php#84884|note]]) 
- 
-  * //function.dns-get-record//: "Note that if you check a non-existing domain you will get ..." ([[http://www.php.net/manual/en/function.dns-get-record.php#86033|note]]) 
- 
-  * //arrayobject.offsetset//: "If $index is null, $newval is naturally pushed onto the end of the array as ArrayObject::append" ([[http://www.php.net/manual/en/arrayobject.offsetset.php#86027|note]]) 
- 
-  * //mysqli.prepare//: "All data must be fetched before a new statement prepare" ([[http://www.php.net/manual/en/mysqli.prepare.php#86025|note]]) 
- 
-  * //function.imagesetthickness//: "Apparently imagesetthickness doesn't work if antialiasing is set to true." ([[http://www.php.net/manual/en/function.imagesetthickness.php#86007|note]]) 
- 
-  * //function.session//: "if you try to name a php session "example.com" it gets converted to "example_com" and everything breaks." ([[http://www.php.net/manual/en/function.session-name.php#86000|note]]) 
  
doc/todo/undocumented.txt · Last modified: 2017/09/22 13:28 (external edit)