doc:todo:undocumented

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:todo:undocumented [2008/08/12 21:27]
kalle Interface constants is now documented
doc:todo:undocumented [2010/04/30 16:55]
colder
Line 48: Line 48:
 </code> </code>
  
 +   * Session: Added ability to provide upload progress feedback through session data. See [[rfc:session_upload_progress]]
  
  
Line 59: Line 59:
 ===== PHP 5.3 ===== ===== PHP 5.3 =====
   * SPL classes: ArrayObject, CachingIterator, RecursiveCachingIterator, DirectoryIterator, FilterIterator, LimitIterator, ParentIterator, RecursiveDirectoryIterator, RecursiveIteratorIterator, SimpleXMLIterator   * 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;''   * ''new static;''
Line 179: Line 119:
  
   * [HOST=] and [PATH=] configuration sections in php.ini   * [HOST=] and [PATH=] configuration sections in php.ini
- 
-  * ''E_DEPRECATED'' 
  
   * zend_parse_parameters types: C, f, Z, h   * zend_parse_parameters types: C, f, Z, h
  
   * ''Closures''   * ''Closures''
- 
 ===== PHP 5.x ==== ===== PHP 5.x ====
 +  * SplObjectStorage::getHash
   * Type hints: ''self'', ''parent'' and interfaces.   * Type hints: ''self'', ''parent'' and interfaces.
 <code php> <code php>
Line 234: Line 171:
 } }
 */ */
-?> 
-</code> 
- 
-  * ''(unset)'' 
-<code php> 
-<?php 
- 
-var_dump((unset)1); // NULL 
- 
 ?> ?>
 </code> </code>
Line 250: Line 178:
  
 ===== Others ===== ===== Others =====
- 
-  * ''case foo:'' accepts also ''case foo;'' 
-<code php> 
-<?php  
- 
-switch (1) { 
-    case 0; 
-        print 'Zero!';  
-        break; 
-    case 1; 
-        print 'One!'; 
-        break; 
-    default; 
-        print 'Other...'; 
-} 
- 
-?> 
-</code> 
- 
-  * ''each()'' works with objects too, althrough return weird and known result. ([[http://bugs.php.net/bug.php?id=43713|bug report]]) 
  
   * Trick for access private properties. ([[http://derickrethans.nl/private_properties_exposed.php|Article]])   * Trick for access private properties. ([[http://derickrethans.nl/private_properties_exposed.php|Article]])
Line 285: Line 193:
 echo $a[$propname]; 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> </code>
Line 305: Line 242:
   * //function.xmlreader-isvalid//: Add example.   * //function.xmlreader-isvalid//: Add example.
   * //function.dba-open//: Suggested example. ([[http://www.php.net/manual/en/function.dba-open.php#79370|note]])   * //function.dba-open//: Suggested example. ([[http://www.php.net/manual/en/function.dba-open.php#79370|note]])
- 
-  * Heredoc in arguments. 
-<code php> 
-<?php  
- 
-var_dump(array(<<<EOD 
-foobar!  
-EOD 
-)); 
- 
-?> 
-</code> 
  
  
 ===== Add Reference ===== ===== 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//)   * ''mb_ereg_search_init'' - Missing list of options. (//php-src/ext/mbstring/oniguruma/doc/API//)
  
Line 353: Line 277:
    
   * //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]])   * //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]])
- 
-  * //function.ctype-space//: "ctype_space('') i.e. the empty string, returns true" ([[http://www.php.net/manual/en/function.ctype-space.php#78563|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]])   * //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]])
Line 377: Line 299:
  
   * //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.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.serialize//: "serialize() will trim() any strings!" ([[http://www.php.net/manual/en/function.serialize.php#78125|note]]) 
  
   * //function.mcal-delete-event//: Current usage is: mcal_delete_event($stream [, $eventid] ); (user note)   * //function.mcal-delete-event//: Current usage is: mcal_delete_event($stream [, $eventid] ); (user note)
Line 394: Line 314:
   * //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]])   * //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]])
 +
 +===== Internals =====
  
 +  * Opcodes: http://markmail.org/thread/gk6hul5mvoyuhgfw
 +  * Arginfo for reflection: http://tmp.cweiske.de/HackingPHP5.xml
doc/todo/undocumented.txt · Last modified: 2017/09/22 13:28 (external edit)