mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-09 02:00:49 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bc1a14f56 |
No files matched your search
@@ -8,7 +8,7 @@ define ____executor_globals
|
||||
end
|
||||
|
||||
document ____executor_globals
|
||||
portable way of accessing executor_globals, set $eg
|
||||
portable way of accessing executor_globals
|
||||
ZTS detection is automatically based on ext/standard module struct
|
||||
end
|
||||
|
||||
@@ -39,18 +39,14 @@ define printzv
|
||||
end
|
||||
|
||||
document printzv
|
||||
prints zval contents
|
||||
prints content of zval
|
||||
end
|
||||
|
||||
define ____printzv_contents
|
||||
set $zvalue = $arg0
|
||||
set $type = $zvalue->type
|
||||
|
||||
printf "(refcount=%d", $zvalue->refcount
|
||||
if $zvalue->is_ref
|
||||
printf ",is_ref"
|
||||
end
|
||||
printf ") "
|
||||
printf "(refcount=%d) ", $zvalue->refcount
|
||||
if $type == 0
|
||||
printf "NULL"
|
||||
end
|
||||
@@ -73,7 +69,7 @@ define ____printzv_contents
|
||||
if ! $arg1
|
||||
printf "{\n"
|
||||
set $ind = $ind + 1
|
||||
____print_ht $zvalue->value.ht 1
|
||||
____print_ht $zvalue->value.ht
|
||||
set $ind = $ind - 1
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
@@ -107,7 +103,7 @@ define ____printzv_contents
|
||||
printf "(%d): ", $ht->nNumOfElements
|
||||
printf "{\n"
|
||||
set $ind = $ind + 1
|
||||
____print_ht $ht 1
|
||||
____print_ht $ht
|
||||
set $ind = $ind - 1
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
@@ -192,10 +188,12 @@ define print_const_table
|
||||
end
|
||||
|
||||
define ____print_ht
|
||||
set $ht = (HashTable*)$arg0
|
||||
set $ht = $arg0
|
||||
set $p = $ht->pListHead
|
||||
|
||||
while $p != 0
|
||||
set $zval = *(zval **)$p->pData
|
||||
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
printf " "
|
||||
@@ -208,18 +206,8 @@ define ____print_ht
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
|
||||
if $arg1 == 0
|
||||
printf "%p\n", (void*)$p->pData
|
||||
end
|
||||
if $arg1 == 1
|
||||
set $zval = *(zval **)$p->pData
|
||||
____printzv $zval 1
|
||||
end
|
||||
if $arg1 == 2
|
||||
printf "%s\n", (char*)$p->pData
|
||||
end
|
||||
|
||||
____printzv $zval 1
|
||||
set $p = $p->pListNext
|
||||
end
|
||||
end
|
||||
@@ -227,7 +215,7 @@ end
|
||||
define print_ht
|
||||
set $ind = 1
|
||||
printf "[0x%08x] {\n", $arg0
|
||||
____print_ht $arg0 1
|
||||
____print_ht $arg0
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
@@ -235,28 +223,6 @@ document print_ht
|
||||
dumps elements of HashTable made of zval
|
||||
end
|
||||
|
||||
define print_htptr
|
||||
set $ind = 1
|
||||
printf "[0x%08x] {\n", $arg0
|
||||
____print_ht $arg0 0
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_htptr
|
||||
dumps elements of HashTable made of pointers
|
||||
end
|
||||
|
||||
define print_htstr
|
||||
set $ind = 1
|
||||
printf "[0x%08x] {\n", $arg0
|
||||
____print_ht $arg0 2
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_htstr
|
||||
dumps elements of HashTable made of strings
|
||||
end
|
||||
|
||||
define ____print_ft
|
||||
set $ht = $arg0
|
||||
set $p = $ht->pListHead
|
||||
|
||||
+1
-1
@@ -256,7 +256,7 @@ that the first implementation include a file labeled 'EXPERIMENTAL'
|
||||
in the function directory, and that the functions follow the
|
||||
standard prefixing conventions during their initial implementation.
|
||||
|
||||
The file labeled 'EXPERIMENTAL' should include the following
|
||||
The file labelled 'EXPERIMENTAL' should include the following
|
||||
information:
|
||||
Any authoring information (known bugs, future directions of the module).
|
||||
Ongoing status notes which may not be appropriate for CVS comments.
|
||||
|
||||
+104
-91
@@ -127,14 +127,32 @@ EXTENSION: dbase
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dbx
|
||||
PRIMARY MAINTAINER: Marc Boeren <M.Boeren@guidance.nl>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql and more, see documentation
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fbsql
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: informix
|
||||
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ingres_ii
|
||||
PRIMARY MAINTAINER: David Hénot <henot@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: interbase
|
||||
PRIMARY MAINTAINER: Ard Biesheuvel <ard@ard.nu>, Jouni Ahto <jouni.ahto@exdec.fi>
|
||||
MAINTENANCE: Odd fixes
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: msql
|
||||
@@ -169,53 +187,14 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
EXTENSION: oracle
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
COMMENT: Using the new OCI8 driver is encouraged where possible.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_dblib
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_firebird
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_mysql
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_odbc
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_oci
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_pgsql
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_sqlite
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
EXTENSION: ovrimos
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pgsql
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Yasuo Ohgaki <yohgaki@php.net>
|
||||
@@ -258,11 +237,11 @@ SINCE: 5.0
|
||||
EXTENSION: soap
|
||||
PRIMARY MAINTAINER: Dmitry Stogov <dmitry@zend.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: wddx
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Orphaned
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xml
|
||||
@@ -270,21 +249,11 @@ PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xmlreader
|
||||
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xmlrpc
|
||||
PRIMARY MAINTAINER: Dan Libby
|
||||
MAINTENANCE: Orphaned
|
||||
MAINTENANCE: UNKNOWN
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xmlwriter
|
||||
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xsl
|
||||
PRIMARY MAINTAINER: Christian Stocker <chregu@php.net>, Rob Richards <rrichards@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -298,7 +267,7 @@ SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: bcmath
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: bz2
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
|
||||
@@ -317,6 +286,11 @@ MAINTENANCE: Maintained
|
||||
STATUS: Windows
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cpdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ctype
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -339,19 +313,27 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: filter
|
||||
PRIMARY MAINTAINER: Derick Rethans <derick@php.net>, Pierre-Alain Joye <pajoye@php.net>, Ilia Alshanetsky <iliaa@php.net>
|
||||
EXTENSION: fam
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.2
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: filepro
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ftp
|
||||
PRIMARY MAINTAINER: Stefan Esser <sesser@php.net>
|
||||
MAINTENANCE: Odd fixes
|
||||
PRIMARY MAINTAINER: Stefan Esser (sesser@php.net)
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: gd
|
||||
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -360,11 +342,15 @@ MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: gmp
|
||||
PRIMARY MAINTAINER: Stanislav Malyshev <stas@php.net>, Antony Dovgal <tony2001@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: hwapi
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: iconv
|
||||
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -375,14 +361,13 @@ PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>, Ilia Alshanetsky <iliaa@
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: json
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.2
|
||||
EXTENSION: ircg
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ldap
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -396,9 +381,14 @@ PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcve
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mhash
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Unknown
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mime_magic
|
||||
@@ -412,26 +402,48 @@ PRIMARY MAINTAINER: Frank M. Kromann
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mnogosearch
|
||||
PRIMARY MAINTAINER: Sergey Kartashoff <gluke@mail.ru>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mono
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: msession
|
||||
PRIMARY MAINTAINER Mark L. Woodward <mlwmohawk@mohawksoft.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working/Experimental
|
||||
COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ncurses
|
||||
PRIMARY MAINTAINER Ilia Alshanetsky <iliaa@php.net>, Wez Furlong <wez@php.net>, Hartmut Holzgraefe <hholzgra@php.net>, Georg Richter <georg@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: openssl
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcntl
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcre
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>, Nuno Lopes <nlopess@php.net>
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pfpro
|
||||
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: posix
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -465,7 +477,7 @@ STATUS: Working
|
||||
EXTENSION: shmop
|
||||
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: snmp
|
||||
@@ -476,7 +488,7 @@ STATUS: Working
|
||||
EXTENSION: sockets
|
||||
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: spl
|
||||
@@ -487,30 +499,31 @@ SINCE: 5.0.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvmsg
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvsem
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvshm
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: tidy
|
||||
PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>, Nuno Lopes <nlopess@php.net>
|
||||
PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: tokenizer
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zip
|
||||
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
|
||||
EXTENSION: yaz
|
||||
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zlib
|
||||
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
|
||||
|
||||
@@ -11,7 +11,7 @@ Installing PHP
|
||||
Caudium
|
||||
fhttpd related notes
|
||||
Sun, iPlanet and Netscape servers on Sun Solaris
|
||||
CGI and command line setups
|
||||
CGI and commandline setups
|
||||
HP-UX specific installation notes
|
||||
OpenBSD installation notes
|
||||
Solaris specific installation tips
|
||||
@@ -20,7 +20,6 @@ Installing PHP
|
||||
3. Installation on Mac OS X
|
||||
|
||||
Using Packages
|
||||
Using the bundled PHP
|
||||
Compiling for OS X Server
|
||||
Compiling for MacOS X Client
|
||||
|
||||
@@ -29,7 +28,7 @@ Installing PHP
|
||||
Introduction to PECL Installations
|
||||
Downloading PECL extensions
|
||||
PECL for Windows users
|
||||
Compiling shared PECL extensions with the pecl command
|
||||
Compiling shared PECL extensions with PEAR
|
||||
Compiling shared PECL extensions with phpize
|
||||
Compiling PECL extensions statically into PHP
|
||||
|
||||
@@ -91,7 +90,7 @@ Chapter 1. General Installation Considerations
|
||||
|
||||
With PHP you can also write desktop GUI applications using the PHP-GTK
|
||||
extension. This is a completely different approach than writing web
|
||||
pages, as you do not output any HTML, but manage Windows and objects
|
||||
pages, as you do not output any HTML, but manage windows and objects
|
||||
within them. For more information about PHP-GTK, please visit the site
|
||||
dedicated to this extension. PHP-GTK is not included in the official
|
||||
PHP distribution.
|
||||
@@ -125,10 +124,10 @@ Chapter 2. Installation on Unix systems
|
||||
package installation system. This can assist in setting up a standard
|
||||
configuration, but if you need to have a different set of features
|
||||
(such as a secure server, or a different database driver), you may need
|
||||
to build PHP and/or your web server. If you are unfamiliar with
|
||||
building and compiling your own software, it is worth checking to see
|
||||
whether somebody has already built a packaged version of PHP with the
|
||||
features you need.
|
||||
to build PHP and/or your webserver. If you are unfamiliar with building
|
||||
and compiling your own software, it is worth checking to see whether
|
||||
somebody has already built a packaged version of PHP with the features
|
||||
you need.
|
||||
|
||||
Prerequisite knowledge and software for compiling:
|
||||
|
||||
@@ -140,8 +139,8 @@ Chapter 2. Installation on Unix systems
|
||||
* Any module specific components (such as gd, pdf libs, etc.)
|
||||
|
||||
The initial PHP setup and configuration process is controlled by the
|
||||
use of the command line options of the configure script. You could get
|
||||
a list of all available options along with short explanations running
|
||||
use of the commandline options of the configure script. You could get a
|
||||
list of all available options along with short explanations running
|
||||
./configure --help. Our manual documents the different options
|
||||
separately. You will find the core options in the appendix, while the
|
||||
different extension specific options are descibed on the reference
|
||||
@@ -346,7 +345,7 @@ stop and start:
|
||||
will mean that you can compile apache separately, and don't have to
|
||||
recompile everything as you add to, or change, PHP. Building PHP into
|
||||
apache (static method) means that PHP will load and run faster. For
|
||||
more information, see the Apache web page on DSO support.
|
||||
more information, see the Apache webpage on DSO support.
|
||||
|
||||
Note: Apache's default httpd.conf currently ships with a section
|
||||
that looks like this:
|
||||
@@ -563,13 +562,13 @@ Sun, iPlanet and Netscape servers on Sun Solaris
|
||||
From PHP 4.3.3 on you can use PHP scripts with the NSAPI module to
|
||||
generate custom directory listings and error pages. Additional
|
||||
functions for Apache compatibility are also available. For support in
|
||||
current web servers read the note about subrequests.
|
||||
current webservers read the note about subrequests.
|
||||
|
||||
You can find more information about setting up PHP for the Netscape
|
||||
Enterprise Server (NES) here:
|
||||
http://benoit.noss.free.fr/php/install-php4.html
|
||||
|
||||
To build PHP with Sun JSWS/Sun ONE WS/iPlanet/Netscape web servers,
|
||||
To build PHP with Sun JSWS/Sun ONE WS/iPlanet/Netscape webservers,
|
||||
enter the proper install directory for the --with-nsapi=[DIR] option.
|
||||
The default directory is usually /opt/netscape/suitespot/. Please also
|
||||
read /php-xxx-version/sapi/nsapi/nsapi-readme.txt.
|
||||
@@ -611,7 +610,7 @@ Sun, iPlanet and Netscape servers on Sun Solaris
|
||||
Configuration Instructions for Sun/iPlanet/Netscape. Firstly you may
|
||||
need to add some paths to the LD_LIBRARY_PATH environment for the
|
||||
server to find all the shared libs. This can best done in the start
|
||||
script for your web server. The start script is often located in:
|
||||
script for your webserver. The start script is often located in:
|
||||
/path/to/server/https-servername/start. You may also need to edit the
|
||||
configuration files that are located in:
|
||||
/path/to/server/https-servername/config/.
|
||||
@@ -632,7 +631,7 @@ Init fn="php4_init" LateInit="yes" errorString="Failed to initialize PHP!" [php_
|
||||
ini="/path/to/php.ini"]
|
||||
|
||||
(PHP >= 4.3.3) The php_ini parameter is optional but with it you
|
||||
can place your php.ini in your web server config directory.
|
||||
can place your php.ini in your webserver config directory.
|
||||
3. Configure the default object in obj.conf (for virtual server
|
||||
classes [version 6.0+] in their vserver.obj.conf):
|
||||
|
||||
@@ -685,8 +684,8 @@ AuthTrans fn=php4_auth_trans
|
||||
</Object>
|
||||
|
||||
Note: The stacksize that PHP uses depends on the configuration of
|
||||
the web server. If you get crashes with very large PHP scripts, it
|
||||
is recommended to raise it with the Admin Server (in the section
|
||||
the webserver. If you get crashes with very large PHP scripts, it is
|
||||
recommended to raise it with the Admin Server (in the section
|
||||
"MAGNUS EDITOR").
|
||||
__________________________________________________________________
|
||||
|
||||
@@ -694,21 +693,22 @@ CGI environment and recommended modifications in php.ini
|
||||
|
||||
Important when writing PHP scripts is the fact that Sun JSWS/Sun ONE
|
||||
WS/iPlanet/Netscape is a multithreaded web server. Because of that all
|
||||
requests are running in the same process space (the space of the web
|
||||
server itself) and this space has only one environment. If you want to
|
||||
get CGI variables like PATH_INFO, HTTP_HOST etc. it is not the correct
|
||||
way to try this in the old PHP 3.x way with getenv() or a similar way
|
||||
(register globals to environment, $_ENV). You would only get the
|
||||
environment of the running web server without any valid CGI variables!
|
||||
requests are running in the same process space (the space of the
|
||||
webserver itself) and this space has only one environment. If you want
|
||||
to get CGI variables like PATH_INFO, HTTP_HOST etc. it is not the
|
||||
correct way to try this in the old PHP 3.x way with getenv() or a
|
||||
similar way (register globals to environment, $_ENV). You would only
|
||||
get the environment of the running webserver without any valid CGI
|
||||
variables!
|
||||
|
||||
Note: Why are there (invalid) CGI variables in the environment?
|
||||
|
||||
Answer: This is because you started the web server process from the
|
||||
admin server which runs the startup script of the web server, you
|
||||
Answer: This is because you started the webserver process from the
|
||||
admin server which runs the startup script of the webserver, you
|
||||
wanted to start, as a CGI script (a CGI script inside of the admin
|
||||
server!). This is why the environment of the started web server has
|
||||
server!). This is why the environment of the started webserver has
|
||||
some CGI environment variables in it. You can test this by starting
|
||||
the web server not from the administration server. Use the command
|
||||
the webserver not from the administration server. Use the command
|
||||
line as root user and start it manually - you will see there are no
|
||||
CGI-like environment variables.
|
||||
|
||||
@@ -749,8 +749,8 @@ pt.php" [inikey=value inikey=value...]
|
||||
Note about nsapi_virtual() and subrequests (PHP >= 4.3.3)
|
||||
|
||||
The NSAPI module now supports the nsapi_virtual() function (alias:
|
||||
virtual()) to make subrequests on the web server and insert the result
|
||||
in the web page. This function uses some undocumented features from the
|
||||
virtual()) to make subrequests on the webserver and insert the result
|
||||
in the webpage. This function uses some undocumented features from the
|
||||
NSAPI library. On Unix the module automatically looks for the needed
|
||||
functions and uses them if available. If not, nsapi_virtual() is
|
||||
disabled.
|
||||
@@ -758,10 +758,10 @@ Note about nsapi_virtual() and subrequests (PHP >= 4.3.3)
|
||||
Note: But be warned: Support for nsapi_virtual() is EXPERIMENTAL!!!
|
||||
__________________________________________________________________
|
||||
|
||||
CGI and command line setups
|
||||
CGI and commandline setups
|
||||
|
||||
The default is to build PHP as a CGI program. This creates a command
|
||||
line interpreter, which can be used for CGI processing, or for
|
||||
The default is to build PHP as a CGI program. This creates a
|
||||
commandline interpreter, which can be used for CGI processing, or for
|
||||
non-web-related PHP scripting. If you are running a web server PHP has
|
||||
module support for, you should generally go for that solution for
|
||||
performance reasons. However, the CGI version enables users to run
|
||||
@@ -816,18 +816,62 @@ Using Variables
|
||||
HP-UX specific installation notes
|
||||
|
||||
This section contains notes and hints specific to installing PHP on
|
||||
HP-UX systems.
|
||||
HP-UX systems. (Contributed by paul_mckay at clearwater-it dot co dot
|
||||
uk).
|
||||
|
||||
There are two main options for installing PHP on HP-UX systems. Either
|
||||
compile it, or install a pre-compiled binary.
|
||||
Note: These tips were written for PHP 4.0.4 and Apache 1.3.9.
|
||||
|
||||
Official pre-compiled packages are located here:
|
||||
http://software.hp.com/
|
||||
1. You need gzip, download a binary distribution from
|
||||
http://hpux.connect.org.uk/ftp/hpux/Gnu/gzip-1.2.4a/gzip-1.2.4a-sd-
|
||||
10.20.depot.Z uncompress the file and install using swinstall.
|
||||
2. You need gcc, download a binary distribution from
|
||||
http://gatekeep.cs.utah.edu/ftp/hpux/Gnu/gcc-2.95.2/gcc-2.95.2-sd-1
|
||||
0.20.depot.gz. uncompress this file and install gcc using
|
||||
swinstall.
|
||||
3. You need the GNU binutils, you can download a binary distribution
|
||||
from
|
||||
http://hpux.connect.org.uk/ftp/hpux/Gnu/binutils-2.9.1/binutils-2.9
|
||||
.1-sd-10.20.depot.gz. uncompress this file and install binutils
|
||||
using swinstall.
|
||||
4. You now need bison, you can download a binary distribution from
|
||||
http://hpux.connect.org.uk/ftp/hpux/Gnu/bison-1.28/bison-1.28-sd-10
|
||||
.20.depot.gz, install as above.
|
||||
5. You now need flex, you need to download the source from one of the
|
||||
http://www.gnu.org mirrors. It is in the non-gnu directory of the
|
||||
ftp site. Download the file, gunzip, then tar -xvf it. Go into the
|
||||
newly created flex directory and run ./configure, followed by make,
|
||||
and then make install.
|
||||
If you have errors here, it's probably because gcc etc. are not in
|
||||
your PATH so add them to your PATH.
|
||||
6. Download the PHP and apache sources.
|
||||
7. gunzip and tar -xvf them. We need to hack a couple of files so that
|
||||
they can compile OK.
|
||||
8. Firstly the configure file needs to be hacked because it seems to
|
||||
lose track of the fact that you are a hpux machine, there will be a
|
||||
better way of doing this but a cheap and cheerful hack is to put
|
||||
lt_target=hpux10.20 on line 47286 of the configure script.
|
||||
9. Next, the Apache GuessOS file needs to be hacked. Under
|
||||
apache_1.3.9/src/helpers change line 89 from echo
|
||||
"hp${HPUXMACH}-hpux${HPUXVER}"; exit 0 to: echo
|
||||
"hp${HPUXMACH}-hp-hpux${HPUXVER}"; exit 0
|
||||
10. You cannot install PHP as a shared object under HP-UX so you must
|
||||
compile it as a static, just follow the instructions at the Apache
|
||||
page.
|
||||
11. PHP and Apache should have compiled OK, but Apache won't start. you
|
||||
need to create a new user for Apache, e.g. www, or apache. You then
|
||||
change lines 252 and 253 of the conf/httpd.conf in Apache so that
|
||||
instead of
|
||||
|
||||
Until this manual section is rewritten, the documentation about
|
||||
compiling PHP (and related extensions) on HP-UX systems has been
|
||||
removed. For now, consider reading the following external resource:
|
||||
Building Apache and PHP on HP-UX 11.11
|
||||
User nobody
|
||||
Group nogroup
|
||||
|
||||
you have something like
|
||||
|
||||
User www
|
||||
Group sys
|
||||
|
||||
This is because you can't run Apache as nobody under hp-ux. Apache
|
||||
and PHP should then work.
|
||||
__________________________________________________________________
|
||||
|
||||
OpenBSD installation notes
|
||||
@@ -1084,104 +1128,6 @@ Using Packages
|
||||
* Fink: http://fink.sourceforge.net/
|
||||
__________________________________________________________________
|
||||
|
||||
Using the bundled PHP
|
||||
|
||||
PHP has come standard with Macs since OS X version 10.0.0. Enabling PHP
|
||||
with the default web server requires uncommenting a few lines in the
|
||||
Apache configuration file httpd.conf whereas the CGI and/or CLI are
|
||||
enabled by default (easily accessible via the Terminal program).
|
||||
|
||||
Enabling PHP using the instructions below is meant for quickly setting
|
||||
up a local development environment. It's highly recommended to always
|
||||
upgrade PHP to the newest version. Like most live software, newer
|
||||
versions are created to fix bugs and add features and PHP being is no
|
||||
different. See the appropriate MAC OS X installation documentation for
|
||||
further details. The following instructions are geared towards a
|
||||
beginner with details provided for getting a default setup to work. All
|
||||
users are encouraged to compile, or install a new packaged version.
|
||||
|
||||
The standard installation type is using mod_php, and enabling the
|
||||
bundled mod_php on Mac OS X for the Apache web server (the default web
|
||||
server, that is accessible via System Preferences) involves the
|
||||
following steps:
|
||||
|
||||
1. Locate and open the Apache configuration file. By default, the
|
||||
location is as follows: /etc/httpd/httpd.conf
|
||||
Using Finder or Spotlight to find this file may prove difficult as
|
||||
by default it's private and owned by the root user.
|
||||
|
||||
Note: One way to open this is by using a Unix based text editor in
|
||||
the Terminal, for example nano, and because the file is owned by
|
||||
root we'll use the sudo command to open it (as root) so for example
|
||||
type the following into the Terminal Application (after, it will
|
||||
prompt for a password): sudo nano /etc/httpd/httpd.conf
|
||||
Noteworthy nano commands: ^w (search), ^o (save), and ^x (exit)
|
||||
where ^ represents the Ctrl key.
|
||||
2. With a text editor, uncomment the lines (by removing the #) that
|
||||
look similar to the following (these two lines are often not
|
||||
together, locate them both in the file):
|
||||
|
||||
# LoadModule php4_module libexec/httpd/libphp4.so
|
||||
|
||||
# AddModule mod_php4.c
|
||||
|
||||
Notice the location/path. When building PHP in the future, the
|
||||
above files should be replaced or commented out.
|
||||
3. Be sure the desired extensions will parse as PHP (examples: .php
|
||||
.html and .inc)
|
||||
Due to the following statement already existing in httpd.conf (as
|
||||
of Mac Panther), once PHP is enabled the .php files will
|
||||
automatically parse as PHP.
|
||||
|
||||
<IfModule mod_php4.c>
|
||||
# If php is turned on, we respect .php and .phps files.
|
||||
AddType application/x-httpd-php .php
|
||||
AddType application/x-httpd-php-source .phps
|
||||
|
||||
# Since most users will want index.php to work we
|
||||
# also automatically enable index.php
|
||||
<IfModule mod_dir.c>
|
||||
DirectoryIndex index.html index.php
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
4. Be sure the DirectoryIndex loads the desired default index file
|
||||
This is also set in httpd.conf. Typically index.php and index.html
|
||||
are used. By default index.php is enabled because it's also in the
|
||||
PHP check shown above. Adjust accordingly.
|
||||
5. Set the php.ini location or use the default
|
||||
A typical default location on Mac OS X is /usr/local/php/php.ini
|
||||
and a call to phpinfo() will reveal this information. If a php.ini
|
||||
is not used, PHP will use all default values. See also the related
|
||||
FAQ on finding php.ini.
|
||||
6. Locate or set the DocumentRoot
|
||||
This is the root directory for all the web files. Files in this
|
||||
directory are served from the web server so the PHP files will
|
||||
parse as PHP before outputting them to the browser. A typical
|
||||
default path is /Library/WebServer/Documents but this can be set to
|
||||
anything in httpd.conf. Alternatively, the default DocumentRoot for
|
||||
individual users is /Users/yourusername/Sites
|
||||
7. Create a phpinfo() file
|
||||
The phpinfo() function will display information about PHP. Consider
|
||||
creating a file in the DocumentRoot with the following PHP code:
|
||||
|
||||
<?php phpinfo(); ?>
|
||||
|
||||
8. Restart Apache, and load the PHP file created above
|
||||
To restart, either execute sudo apachectl graceful in the shell or
|
||||
stop/start the "Personal Web Server" option in the OS X System
|
||||
Preferences. By default, loading local files in the browser will
|
||||
have an URL like so: http://localhost/info.php Or using the
|
||||
DocumentRoot in the user directory is another option and would end
|
||||
up looking like: http://localhost/~yourusername/info.php
|
||||
|
||||
The CLI (or CGI in older versions) is appropriately named php and
|
||||
likely exists as /usr/bin/php. Open up the terminal, read the command
|
||||
line section of the PHP manual, and execute php -v to check the PHP
|
||||
version of this PHP binary. A call to phpinfo() will also reveal this
|
||||
information.
|
||||
__________________________________________________________________
|
||||
|
||||
Compiling for OS X Server
|
||||
|
||||
Mac OS X Server install.
|
||||
@@ -1292,8 +1238,7 @@ Introduction to PECL Installations
|
||||
These instructions assume /your/phpsrcdir/ is the path to the PHP
|
||||
source distribution, and that extname is the name of the PECL
|
||||
extension. Adjust accordingly. These instructions also assume a
|
||||
familiarity with the pear command. The information in the PEAR manual
|
||||
for the pear command also applies to the pecl command.
|
||||
familiarity with the pear command.
|
||||
|
||||
To be useful, a shared extension must be built, installed, and loaded.
|
||||
The methods described below provide you with various instructions on
|
||||
@@ -1318,7 +1263,7 @@ Downloading PECL extensions
|
||||
requirements and other similar details.
|
||||
* pecl download extname
|
||||
PECL extensions that have releases listed on the PECL web site are
|
||||
available for download and installation using the pecl command.
|
||||
available for download and installation using the pear command.
|
||||
Specific revisions may also be specified.
|
||||
* CVS
|
||||
Most PECL extensions also reside in CVS. A web-based view may be
|
||||
@@ -1331,9 +1276,9 @@ $ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname
|
||||
|
||||
* Windows downloads
|
||||
Windows users may find compiled PECL binaries by downloading the
|
||||
Collection of PECL modules from the PHP Downloads page, or by
|
||||
retrieving a PECL Snapshot or an extension DLL on PECL4WIN. To
|
||||
compile PHP under Windows, read the appropriate chapter.
|
||||
Collection of PECL modules from the PHP Downloads page, and by
|
||||
retrieving a PECL Snapshot. To compile PHP under Windows, read the
|
||||
appropriate chapter.
|
||||
__________________________________________________________________
|
||||
|
||||
PECL for Windows users
|
||||
@@ -1348,9 +1293,9 @@ PECL for Windows users
|
||||
After doing this, restart the web server.
|
||||
__________________________________________________________________
|
||||
|
||||
Compiling shared PECL extensions with the pecl command
|
||||
Compiling shared PECL extensions with PEAR
|
||||
|
||||
PECL makes it easy to create shared PHP extensions. Using the pecl
|
||||
PEAR makes it easy to create shared PHP extensions. Using the pear
|
||||
command, do the following:
|
||||
|
||||
$ pecl install extname
|
||||
@@ -1359,7 +1304,7 @@ Compiling shared PECL extensions with the pecl command
|
||||
extname.so into your extension_dir. extname.so may then be loaded via
|
||||
php.ini
|
||||
|
||||
By default, the pecl command will not install packages that are marked
|
||||
By default, the pear command will not install packages that are marked
|
||||
with the alpha or beta state. If no stable packages are available, you
|
||||
may install a beta package using the following command:
|
||||
|
||||
@@ -1372,9 +1317,9 @@ Compiling shared PECL extensions with the pecl command
|
||||
|
||||
Compiling shared PECL extensions with phpize
|
||||
|
||||
Sometimes, using the pecl installer is not an option. This could be
|
||||
Sometimes, using the pear installer is not an option. This could be
|
||||
because you're behind a firewall, or it could be because the extension
|
||||
you want to install is not available as a PECL compatible package, such
|
||||
you want to install is not available as a PEAR compatible package, such
|
||||
as unreleased extensions from CVS. If you need to build such an
|
||||
extension, you can use the lower-level build tools to perform the build
|
||||
manually.
|
||||
@@ -1410,7 +1355,7 @@ Compiling PECL extensions statically into PHP
|
||||
regenerate its configure script.
|
||||
|
||||
$ cd /your/phpsrcdir/ext
|
||||
$ pecl download extname
|
||||
$ pear download extname
|
||||
$ gzip -d < extname.tgz | tar -xvf -
|
||||
$ mv extname-x.x.x extname
|
||||
|
||||
@@ -1496,9 +1441,9 @@ The configuration file
|
||||
* The PHPRC environment variable. Before PHP 5.2.0 this was checked
|
||||
after the registry key mentioned below.
|
||||
* As of PHP 5.2.0, the following registry locations are searched in
|
||||
order: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z\IniFilePath,
|
||||
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y\IniFilePath and
|
||||
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x\IniFilePath, where x, y and z
|
||||
order: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath\x.y.z,
|
||||
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath\x.y and
|
||||
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath\x, where x, y and z
|
||||
mean the PHP major, minor and release versions.
|
||||
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry
|
||||
location)
|
||||
|
||||
+9
-9
@@ -3,21 +3,21 @@
|
||||
# Zend
|
||||
#
|
||||
|
||||
$(builddir)/zend_language_scanner.lo: $(srcdir)/zend_language_parser.h
|
||||
$(builddir)/zend_ini_scanner.lo: $(srcdir)/zend_ini_parser.h
|
||||
$(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h
|
||||
$(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h
|
||||
|
||||
$(srcdir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
|
||||
$(builddir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
|
||||
@$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
|
||||
|
||||
$(srcdir)/zend_language_parser.h: $(srcdir)/zend_language_parser.c
|
||||
$(srcdir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
|
||||
$(builddir)/zend_language_parser.h: $(builddir)/zend_language_parser.c
|
||||
$(builddir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
|
||||
@$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o $@
|
||||
|
||||
$(srcdir)/zend_ini_parser.h: $(srcdir)/zend_ini_parser.c
|
||||
$(srcdir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
|
||||
$(builddir)/zend_ini_parser.h: $(builddir)/zend_ini_parser.c
|
||||
$(builddir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
|
||||
@$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
|
||||
|
||||
$(srcdir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
|
||||
$(builddir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
|
||||
@$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
|
||||
|
||||
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(srcdir)/zend_language_parser.h
|
||||
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(builddir)/zend_language_parser.h
|
||||
+15
-60
@@ -8,27 +8,27 @@ COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORK
|
||||
all: $(all_targets)
|
||||
@echo
|
||||
@echo "Build complete."
|
||||
@echo "Don't forget to run 'make test'."
|
||||
@echo "(It is safe to ignore warnings about tempnam and tmpnam)."
|
||||
@echo
|
||||
|
||||
build-modules: $(PHP_MODULES)
|
||||
|
||||
libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
libphp5.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
||||
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
|
||||
-@$(LIBTOOL) --silent --mode=install cp libphp5.la $(phptempdir)/libphp5.la >/dev/null 2>&1
|
||||
|
||||
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
|
||||
libs/libphp5.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp5.so
|
||||
|
||||
install: $(all_targets) $(install_targets)
|
||||
|
||||
install-sapi: $(OVERALL_TARGET)
|
||||
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
|
||||
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
|
||||
-@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
|
||||
-@if test ! -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); then \
|
||||
for i in 0.0.0 0.0 0; do \
|
||||
if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
|
||||
$(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \
|
||||
if test -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i; then \
|
||||
$(LN_S) $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); \
|
||||
break; \
|
||||
fi; \
|
||||
done; \
|
||||
@@ -66,78 +66,33 @@ install-headers:
|
||||
fi \
|
||||
done; \
|
||||
fi
|
||||
|
||||
install-su: install-pear
|
||||
|
||||
PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
|
||||
PHP_TEST_SHARED_EXTENSIONS = ` \
|
||||
if test "x$(PHP_MODULES)" != "x"; then \
|
||||
for i in $(PHP_MODULES)""; do \
|
||||
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
|
||||
done; \
|
||||
fi`
|
||||
|
||||
test: all
|
||||
test: all
|
||||
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
|
||||
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -U -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
|
||||
$(PHP_EXECUTABLE) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \
|
||||
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
|
||||
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
|
||||
if test "$$INI_FILE"; then \
|
||||
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
|
||||
else \
|
||||
echo > $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -U -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
utest: all
|
||||
-@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
|
||||
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
|
||||
if test "$$INI_FILE"; then \
|
||||
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
|
||||
else \
|
||||
echo > $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -u -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
ntest: all
|
||||
-@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
|
||||
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
|
||||
if test "$$INI_FILE"; then \
|
||||
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
|
||||
else \
|
||||
echo > $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -N -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS); \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
|
||||
find . -name \*.lo -o -name \*.o | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
find . -name .libs -a -type d|xargs rm -rf
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
rm -f libphp5.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
distclean: clean
|
||||
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
|
||||
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp5.module buildmk.stamp
|
||||
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
|
||||
find . -name Makefile | xargs rm -f
|
||||
|
||||
|
||||
@@ -1,568 +1,5 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
16 Aug 2007, PHP 5.2.4RC2
|
||||
- Fixed oci8 and PDO_OCI extensions to allow configuring with Oracle 11g client
|
||||
libraries. (Chris Jones)
|
||||
- Fixed bug #42292 ($PHP_CONFIG not set for phpized builds). (Jani)
|
||||
- Fixed bug #42261 (header wrong for date field). (roberto at spadim dot com
|
||||
dot br, Ilia)
|
||||
- Fixed bug #42259 (SimpleXMLIterator loses ancestry). (Rob)
|
||||
- Fixed bug #42247 (ldap_parse_result() not defined under win32). (Jani)
|
||||
- Fixed bug #42243 (copy() does not output an error when the first arg is a
|
||||
dir). (Ilia)
|
||||
- Fixed bug #42242 (sybase_connect() crashes). (Ilia)
|
||||
- Fixed bug #42237 (stream_copy_to_stream returns invalid values for mmaped
|
||||
streams). (andrew dot minerd at sellingsource dot com, Ilia)
|
||||
- Fixed bug #42233 (Problems with æøå in extract()). (Jani)
|
||||
- Fixed bug #42222 (possible buffer overflow in php_openssl_make_REQ). (Pierre)
|
||||
- Fixed bug #42211 (property_exists() fails to find protected properties from
|
||||
a parent class). (Dmitry)
|
||||
- Fixed bug #42208 (substr_replace() crashes when the same array is passed
|
||||
more than once). (crrodriguez at suse dot de, Ilia)
|
||||
- Fixed bug #42198 (SCRIPT_NAME and PHP_SELF truncated when inside a userdir
|
||||
and using PATH_INFO). (Dmitry)
|
||||
- Fixed bug #42195 (C++ compiler required always). (Jani)
|
||||
- Fixed bug #42117 (bzip2.compress loses data in internal buffer). (Philip,
|
||||
Ilia)
|
||||
- Fixed bug #42082 (NodeList length zero should be empty). (Hannes)
|
||||
- Fixed bug #41973 (./configure --with-ldap=shared fails with
|
||||
LDFLAGS="-Wl,--as-needed"). (Nuno)
|
||||
- Fixed bug #36492 (Userfilters can leak buckets). (Sara)
|
||||
- Fixed bug #31892 (PHP_SELF incorrect without cgi.fix_pathinfo, but turning
|
||||
on screws up PATH_INFO). (Dmitry)
|
||||
|
||||
02 Aug 2007, PHP 5.2.4RC1
|
||||
- Removed --enable-versioning configure option. (Jani)
|
||||
|
||||
- Upgraded PCRE to version 7.2 (Nuno)
|
||||
- Updated timezone database to version 2007.6. (Derick)
|
||||
|
||||
- Improved openssl_x509_parse() to return extensions in readable form. (Dmitry)
|
||||
- Improved fix for MOPB-03-2007. (Ilia)
|
||||
- Corrected fix for CVE-2007-2872. (Ilia)
|
||||
- Enabled changing the size of statement cache for non-persistent OCI8
|
||||
connections. (Chris Jones, Tony)
|
||||
|
||||
- Changed "display_errors" php.ini option to accept "stderr" as value which
|
||||
makes the error messages to be outputted to STDERR instead of STDOUT with
|
||||
CGI and CLI SAPIs (FR #22839). (Jani)
|
||||
- Changed error handler to send HTTP 500 instead of blank page on PHP errors.
|
||||
(Dmitry, Andrei Nigmatulin)
|
||||
- Changed mail() function to be always available. (Johannes)
|
||||
|
||||
- Added check for unknown options passed to configure. (Jani)
|
||||
- Added persistent connection status checker to pdo_pgsql.
|
||||
(Elvis Pranskevichus, Ilia)
|
||||
- Added support for ATTR_TIMEOUT inside pdo_pgsql driver. (Ilia)
|
||||
- Added php_ini_loaded_file() function which returns the path to the actual
|
||||
php.ini in use. (Jani)
|
||||
- Added GD version constants GD_MAJOR_VERSION, GD_MINOR_VERSION
|
||||
GD_RELEASE_VERSION, GD_EXTRA_VERSION and GD_VERSION_STRING. (Pierre)
|
||||
- Added missing open_basedir checks to CGI.
|
||||
(anight at eyelinkmedia dot com, Tony)
|
||||
- Added missing format validator to unpack() function. (Ilia)
|
||||
- Added missing error check inside bcpowmod(). (Ilia)
|
||||
- Added CURLOPT_PRIVATE & CURLINFO_PRIVATE constants.
|
||||
(Andrey A. Belashkov, Tony)
|
||||
- Added missing MSG_EOR and MSG_EOF constants to sockets extension. (Jani)
|
||||
- Added PCRE_VERSION constant. (Tony)
|
||||
- Added ReflectionExtension::info() function to print the phpinfo() block for
|
||||
an extension. (Johannes)
|
||||
|
||||
- Implemented FR #41884 (ReflectionClass::getDefaultProperties() does not handle
|
||||
static attributes). (Tony)
|
||||
|
||||
- Fixed EOF handling in case of reading from file opened in write only mode.
|
||||
(Dmitry)
|
||||
- Fixed "Floating point exception" inside wordwrap(). (Mattias Bengtsson,
|
||||
Ilia)
|
||||
- Fixed crash in OpenSSL extension because of non-string passphrase. (Dmitry)
|
||||
- Fixed var_export() to use the new H modifier so that it can generate
|
||||
parseable PHP code for floats, independent of the locale. (Derick)
|
||||
- Fixed regression introduced by the fix for the libgd bug #74. (Pierre)
|
||||
- Fixed several integer overflows in ImageCreate(), ImageCreateTrueColor(),
|
||||
ImageCopyResampled() and ImageFilledPolygon() reported by Mattias Bengtsson.
|
||||
(Tony)
|
||||
- Fixed size calculation in chunk_split(). (Stas)
|
||||
- Fixed integer overflow in str[c]spn(). (Stas)
|
||||
- Fixed money_format() not to accept multiple %i or %n tokens. (Stas, Ilia)
|
||||
- Fixed zend_alter_ini_entry() memory_limit interruption vulnerability.
|
||||
(Ilia)
|
||||
- Fixed INFILE LOCAL option handling with MySQL extensions not to be allowed
|
||||
when open_basedir or safe_mode is active. (Stas)
|
||||
- Fixed SimpleXML's behavior when used with empty(). (Sara)
|
||||
- Fixed session.save_path and error_log values to be checked against
|
||||
open_basedir and safe_mode (CVE-2007-3378) (Stas, Maksymilian Arciemowicz)
|
||||
- Fixed possible invalid read in glob() win32 implementation (CVE-2007-3806).
|
||||
(Tony)
|
||||
|
||||
- Fixed PECL Bug #11345 (PDO_OCI crash after National language Support "NLS"
|
||||
environment initialization error). (Chris Jones)
|
||||
- Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory
|
||||
already exists). (Pierre)
|
||||
|
||||
- Fixed bug #42173 (oci8 INTERVAL and TIMESTAMP type fixes). (Chris)
|
||||
- Fixed bug #42151 (__destruct functions not called after catching a SoapFault
|
||||
exception). (Dmitry)
|
||||
- Fixed bug #42142 (substr_replace() returns FALSE when length > string
|
||||
length). (Ilia)
|
||||
- Fixed bug #42135 (Second call of session_start() causes creation of SID).
|
||||
(Ilia)
|
||||
- Fixed bug #42134 (oci_error() returns false after oci_new_collection()
|
||||
fails). (Tony)
|
||||
- Fixed bug #42119 (array_push($arr,&$obj) doesn't work with
|
||||
zend.ze1_compatibility_mode On). (Dmitry)
|
||||
- Fixed bug #42112 (deleting a node produces memory corruption). (Rob)
|
||||
- Fixed bug #42107 (sscanf broken when using %2$s format parameters). (Jani)
|
||||
- Fixed bug #42090 (json_decode causes segmentation fault). (Hannes)
|
||||
- Fixed bug #42072 (No warning message for clearstatcache() with arguments).
|
||||
(Ilia)
|
||||
- Fixed bug #42071 (ini scanner allows using NULL as option name). (Jani)
|
||||
- Fixed bug #42027 (is_file() / is_dir() matches file/dirnames with wildcard
|
||||
char or trailing slash in Windows). (Dmitry)
|
||||
- Fixed bug #42019 (configure option --with-adabas=DIR does not work). (Jani)
|
||||
- Fixed bug #42015 (ldap_rename(): server error "DSA is unwilling to perform").
|
||||
(bob at mroczka dot com, Jani)
|
||||
- Fixed bug #41989 (move_uploaded_file() & relative path in ZTS mode). (Tony)
|
||||
- Fixed bug #41984 (Hangs on large SoapClient requests). (Dmitry)
|
||||
- Fixed bug #41983 (Error Fetching http headers terminated by '\n'). (Dmitry)
|
||||
- Fixed bug #41971 (PDOStatement::fetch and PDOStatement::setFetchMode causes
|
||||
unexpected behavior). (Ilia)
|
||||
- Fixed bug #41964 (strtotime returns a timestamp for non-time string of
|
||||
pattern '(A|a) .+'). (Derick)
|
||||
- Fixed bug #41961 (Ensure search for hidden private methods does not stray
|
||||
from class hierarchy). (robin_fernandes at uk dot ibm dot com)
|
||||
- Fixed bug #41947 (SimpleXML incorrectly registers empty strings as
|
||||
namespaces). (Rob)
|
||||
- Fixed bug #41929 (Foreach on object does not iterate over all visible
|
||||
properties). (Dmitry)
|
||||
- Fixed bug #41919 (crash in string to array conversion).
|
||||
(judas dot iscariote at gmail dot com, Ilia)
|
||||
- Fixed bug #41908 (CFLAGS="-Os" ./configure --enable-debug fails).
|
||||
(christian at hoffie dot info, Tony)
|
||||
- Fixed bug #41909 (var_export() is locale sensitive when exporting float
|
||||
values). (Derick)
|
||||
- Fixed bug #41867 (SimpleXML: getName is broken). (Rob)
|
||||
- Fixed bug #41865 (fputcsv(): 2nd parameter is not optional). (Jani)
|
||||
- Fixed bug #41861 (SimpleXML: getNamespaces() returns the namespaces of
|
||||
a node's siblings). (Rob)
|
||||
- Fixed bug #41845 (pgsql extension does not compile with PostgreSQL <7.4).
|
||||
(Ilia)
|
||||
- Fixed bug #41844 (Format returns incorrect number of digits for negative
|
||||
years -0001 to -0999). (Derick)
|
||||
- Fixed bug #41842 (Cannot create years < 0100 & negative years with
|
||||
date_create or new DateTime). (Derick)
|
||||
- Fixed bug #41833 (addChild() on a non-existent node, no node created,
|
||||
getName() segfaults). (Rob)
|
||||
- Fixed bug #41831 (pdo_sqlite prepared statements convert resources to
|
||||
strings). (Ilia)
|
||||
- Fixed bug #41815 (Concurrent read/write fails when EOF is reached). (Sascha)
|
||||
- Fixed bug #41813 (segmentation fault when using string offset as an object).
|
||||
(judas dot iscariote at gmail dot com, Tony)
|
||||
- Fixed bug #41795 (checkdnsrr does not support DNS_TXT type).
|
||||
(lucas at facebook dot com, Tony)
|
||||
- Fixed bug #41773 (php_strip_whitespace() sends headers with errors
|
||||
suppressed). (Tony)
|
||||
- Fixed bug #41765 (Recode crashes/does not work on amd64).
|
||||
(nexus at smoula dot net, Stas)
|
||||
- Fixed bug #41724 (libxml_get_last_error() - errors service request scope).
|
||||
(thekid at php dot net, Ilia)
|
||||
- Fixed bug #41717 (imagepolygon does not respect thickness). (Pierre)
|
||||
- Fixed bug #41711 (NULL temporary lobs not supported in OCI8).
|
||||
(Chris Jones, Tony)
|
||||
- Fixed bug #41770 (SSL: fatal protocol error due to buffer issues). (Ilia)
|
||||
- Fixed bug #41713 (Persistent memory consumption on win32 since 5.2). (Dmitry)
|
||||
- Fixed bug #41709 (strtotime() does not handle 00.00.0000). (Derick)
|
||||
- Fixed bug #41698 (float parameters truncated to integer in prepared
|
||||
statements). (Ilia)
|
||||
- Fixed bug #41692 (ArrayObject shows weird behavior in respect to
|
||||
inheritance). (Tony)
|
||||
- Fixed bug #41691 (ArrayObject::exchangeArray hangs Apache). (Tony)
|
||||
- Fixed bug #41686 (Omitting length param in array_slice not possible).
|
||||
(Ilia)
|
||||
- Fixed bug #41685 (array_push() fails to warn when next index is already
|
||||
occupied). (Ilia)
|
||||
- Fixed bug #41655 (open_basedir bypass via glob()). (Ilia)
|
||||
- Fixed bug #41640 (get_class_vars produces error on class constants).
|
||||
(Johannes)
|
||||
- Fixed bug #41635 (SoapServer and zlib.output_compression with FastCGI result
|
||||
in major slowdown). (Dmitry)
|
||||
- Fixed bug #41633 (Crash instantiating classes with self-referencing
|
||||
constants). (Dmitry)
|
||||
- Fixed bug #41630 (segfault when an invalid color index is present in
|
||||
the image data). (Reported by Elliot <wccoder@gmail dot com>) (Pierre)
|
||||
- Fixed bug #41628 (PHP settings leak between Virtual Hosts in
|
||||
Apache 1.3). (Scott, manuel at mausz dot at)
|
||||
- Fixed bug #41608 (segfault on a weird code with objects and switch()).
|
||||
(Tony)
|
||||
- Fixed bug #41600 (url rewriter tags doesn't work with namespaced tags).
|
||||
(Ilia)
|
||||
- Fixed bug #41596 (Fixed a crash inside pdo_pgsql on some non-well-formed
|
||||
SQL queries). (Ilia)
|
||||
- Fixed bug #41594 (OCI8 statement cache is flushed too frequently). (Tony)
|
||||
- Fixed bug #41582 (SimpleXML crashes when accessing newly created element).
|
||||
(Tony)
|
||||
- Fixed bug #41576 (configure failure when using --without-apxs or some other
|
||||
SAPIs disabling options). (Jani)
|
||||
- Fixed bug #41567 (json_encode() double conversion is inconsistent with PHP).
|
||||
(Lucas, Ilia)
|
||||
- Fixed bug #41566 (SOAP Server not properly generating href attributes).
|
||||
(Dmitry)
|
||||
- Fixed bug #41561 (php_admin_* values set in httpd.conf can be overwritten
|
||||
with ini_set()). (Tony, Dmitry)
|
||||
- Fixed bug #41555 (configure failure: regression caused by fix for #41265).
|
||||
(Jani)
|
||||
- Fixed bug #41527 (WDDX deserialize numeric string array key). (Matt, Ilia)
|
||||
- Fixed bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30).
|
||||
(Derick)
|
||||
- Fixed bug #41518 (file_exists() warns of open_basedir restriction on
|
||||
non-existent file). (Tony)
|
||||
- Fixed bug #41445 (parse_ini_file() has a problem with certain types of
|
||||
integer as sections). (Tony)
|
||||
- Fixed bug #41433 (DBA: configure fails to include correct db.h for db4).
|
||||
(Jani)
|
||||
- Fixed bug #41372 (Internal pointer of source array resets during array
|
||||
copying). (Dmitry)
|
||||
- Fixed bug #41350 (my_thread_global_end() error during request shutdown
|
||||
on Windows). (Scott, Andrey)
|
||||
- Fixed bug #41278 (get_loaded_extensions() should list Zend extensions).
|
||||
(Johannes)
|
||||
- Fixed bug #41127 (Memory leak in ldap_{first|next}_attribute functions).
|
||||
(Jani)
|
||||
- Fixed bug #40757 (get_object_vars get nothing in child class). (Dmitry)
|
||||
- Fixed bug #40705 (Iterating within function moves original array pointer).
|
||||
(Dmitry)
|
||||
- Fixed bug #40509 (key() function changed behaviour if global array is used
|
||||
within function). (Dmitry)
|
||||
- Fixed bug #40419 (Trailing slash in CGI request does not work). (Dmitry)
|
||||
- Fixed bug #39330 (apache2handler does not call shutdown actions before
|
||||
apache child die). (isk at ecommerce dot com, Gopal, Tony)
|
||||
- Fixed bug #39291 (ldap_sasl_bind() misses the sasl_authc_id parameter).
|
||||
(diafour at gmail dot com, Jani)
|
||||
- Fixed bug #37715 (array pointers resetting on copy). (Dmitry)
|
||||
- Fixed bugs #36796, #36918, #41371 (stream_set_blocking() does not work).
|
||||
(Jani)
|
||||
- Fixed bug #35981 (pdo-pgsql should not use pkg-config when not present).
|
||||
(Jani)
|
||||
- Fixed bug #21197 (socket_read() outputs error with PHP_NORMAL_READ).
|
||||
(Nuno, Jani)
|
||||
|
||||
31 May 2007, PHP 5.2.3
|
||||
- Changed CGI install target to php-cgi and 'make install' to install CLI
|
||||
when CGI is selected. (Jani)
|
||||
- Changed JSON maximum nesting depth from 20 to 128. (Rasmus)
|
||||
|
||||
- Improved compilation of heredocs and interpolated strings. (Matt, Dmitry)
|
||||
- Optimized out a couple of per-request syscalls. (Rasmus)
|
||||
- Optimized digest generation in md5() and sha1() functions. (Ilia)
|
||||
- Upgraded bundled SQLite 3 to version 3.3.17. (Ilia)
|
||||
|
||||
- Added "max_input_nesting_level" php.ini option to limit nesting level of
|
||||
input variables. Fix for MOPB-03-2007. (Stas)
|
||||
- Added a 4th parameter flag to htmlspecialchars() and htmlentities() that
|
||||
makes the function not encode existing html entities. (Ilia)
|
||||
- Added PDO::FETCH_KEY_PAIR mode that will fetch a 2 column result set into
|
||||
an associated array. (Ilia)
|
||||
- Added CURLOPT_TIMEOUT_MS and CURLOPT_CONNECTTIMEOUT_MS cURL constants. (Sara)
|
||||
- Added --ini switch to CLI that prints out configuration file names. (Marcus)
|
||||
- Added mysql_set_charset() to allow runtime altering of connection encoding.
|
||||
(Scott)
|
||||
|
||||
- Implemented FR #41416 (getColumnMeta() should also return table name). (Tony)
|
||||
|
||||
- Fixed an integer overflow inside chunk_split(). Identified by Gerhard Wagner.
|
||||
(Ilia)
|
||||
- Fixed SOAP extension's handler() to work even when
|
||||
"always_populate_raw_post_data" is off. (Ilia)
|
||||
- Fixed possible infinite loop in imagecreatefrompng. (libgd #86)
|
||||
(by Xavier Roche, CVE-2007-2756). (Pierre)
|
||||
- Fixed ext/filter Email Validation Vulnerability (MOPB-45 by Stefan Esser).
|
||||
(Ilia)
|
||||
- Fixed altering $this via argument named "this". (Dmitry)
|
||||
- Fixed PHP CLI usage of php.ini from the binary location. (Hannes)
|
||||
- Fixed segfault in strripos(). (Tony, Joxean Koret)
|
||||
- Fixed bug #41693 (scandir() allows empty directory names). (Ilia)
|
||||
- Fixed bug #41673 (json_encode breaks large numbers in arrays). (Ilia)
|
||||
- Fixed bug #41525 (ReflectionParameter::getPosition() not available). (Marcus)
|
||||
- Fixed bug #41511 (Compile failure under IRIX 6.5.30 building md5.c). (Jani)
|
||||
- Fixed bug #41504 (json_decode() incorrectly decodes JSON arrays with empty
|
||||
string keys). (Ilia)
|
||||
- Fixed bug #41492 (open_basedir/safe_mode bypass inside realpath()). (Ilia)
|
||||
- Fixed bug #41477 (no arginfo about SoapClient::__soapCall()). (Ilia)
|
||||
- Fixed bug #41455 (ext/dba/config.m4 pollutes global $LIBS and $LDFLAGS).
|
||||
(mmarek at suse dot cz, Tony)
|
||||
- Fixed bug #41442 (imagegd2() under output control). (Tony)
|
||||
- Fixed bug #41430 (Fatal error with negative values of maxlen parameter of
|
||||
file_get_contents()). (Tony)
|
||||
- Fixed bug #41423 (PHP assumes wrongly that certain ciphers are enabled in
|
||||
OpenSSL). (Pierre)
|
||||
- Fixed bug #41421 (Uncaught exception from a stream wrapper segfaults).
|
||||
(Tony, Dmitry)
|
||||
- Fixed bug #41403 (json_decode cannot decode floats if localeconv
|
||||
decimal_point is not '.'). (Tony)
|
||||
- Fixed bug #41401 (wrong unary operator precedence). (Stas)
|
||||
- Fixed bug #41394 (dbase_create creates file with corrupted header). (Tony)
|
||||
- Fixed bug #41390 (Clarify error message with invalid protocol scheme).
|
||||
(Scott)
|
||||
- Fixed bug #41378 (fastcgi protocol lacks support for Reason-Phrase in
|
||||
"Status:" header). (anight at eyelinkmedia dot com, Dmitry)
|
||||
- Fixed bug #41374 (whole text concats values of wrong nodes). (Rob)
|
||||
- Fixed bug #41358 (configure cannot determine SSL lib with libcurl >= 7.16.2).
|
||||
(Mike)
|
||||
- Fixed bug #41353 (crash in openssl_pkcs12_read() on invalid input). (Ilia)
|
||||
- Fixed bug #41351 (Invalid opcode with foreach ($a[] as $b)). (Dmitry, Tony)
|
||||
- Fixed bug #41347 (checkdnsrr() segfaults on empty hostname). (Scott)
|
||||
- Fixed bug #41337 (WSDL parsing doesn't ignore non soap bindings). (Dmitry)
|
||||
- Fixed bug #41326 (Writing empty tags with Xmlwriter::WriteElement[ns])
|
||||
(Pierre)
|
||||
- Fixed bug #41321 (downgrade read errors in getimagesize() to E_NOTICE).
|
||||
(Ilia)
|
||||
- Fixed bug #41304 (compress.zlib temp files left). (Dmitry)
|
||||
- Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
|
||||
default post handler). (Ilia)
|
||||
- Fixed bug #41291 (FastCGI does not set SO_REUSEADDR).
|
||||
(fmajid at kefta dot com, Dmitry)
|
||||
- Fixed gd build when used with freetype 1.x (Pierre, Tony)
|
||||
- Fixed bug #41287 (Namespace functions don't allow xmlns definition to be
|
||||
optional). (Rob)
|
||||
- Fixed bug #41285 (Improved fix for CVE-2007-1887 to work with non-bundled
|
||||
sqlite2 lib). (Ilia)
|
||||
- Fixed bug #41283 (Bug with deserializing array key that are doubles or
|
||||
floats in wddx). (Ilia)
|
||||
- Fixed bug #41257 (lookupNamespaceURI does not work as expected). (Rob)
|
||||
- Fixed bug #41236 (Regression in timeout handling of non-blocking SSL
|
||||
connections during reads and writes). (Ilia)
|
||||
- Fixed bug #41134 (zend_ts_hash_clean not thread-safe).
|
||||
(marco dot cova at gmail dot com, Tony)
|
||||
- Fixed bug #41097 (ext/soap returning associative array as indexed without
|
||||
using WSDL). (Dmitry)
|
||||
- Fixed bug #41004 (minOccurs="0" and null class member variable). (Dmitry)
|
||||
- Fixed bug #39542 (Behavior of require/include different to < 5.2.0).
|
||||
(Dmitry)
|
||||
|
||||
03 May 2007, PHP 5.2.2
|
||||
- Improved bundled GD
|
||||
. Sync to 2.0.35
|
||||
. Added imagegrabwindow and imagegrabscreen, capture a screen or a
|
||||
window using its handle (Pierre)
|
||||
. colors allocated henceforth from the resulting image overwrite the palette
|
||||
colors (Rob Leslie)
|
||||
. Improved thread safety of the gif support (Roman Nemecek, Nuno, Pierre)
|
||||
. Use the dimension of the GIF frame to create the destination image (Pierre)
|
||||
. Load only once the local color map from a GIF data (Pierre)
|
||||
. Improved thread safety of the freetype cache (Scott MacVicar, Nuno, Pierre)
|
||||
. imagearc huge CPU usage with large angles, libgd bug #74 (Pierre)
|
||||
- Improved FastCGI SAPI to support external pipe and socket servers on win32.
|
||||
(Dmitry)
|
||||
- Improved Zend Memory Manager
|
||||
. guarantee of reasonable time for worst cases of best-fit free block
|
||||
searching algorithm. (Dmitry)
|
||||
. better cache usage and less fragmentation on erealloc() (Tony, Dmitry)
|
||||
- Improved SPL (Marcus)
|
||||
. Added SplFileInfo::getBasename(), DirectoryIterator::getBasename().
|
||||
. Added SplFileInfo::getLinkTarget(), SplFileInfo::getRealPath().
|
||||
. Made RecursiveFilterIterator::accept() abstract as stated in documentation.
|
||||
- Improved SOAP
|
||||
. Added ability to encode arrays with "SOAP-ENC:Array" type instead of WSDL
|
||||
type. To activate the ability use "feature"=>SOAP_USE_XSI_ARRAY_TYPE
|
||||
option in SoapClient/SoapServer constructors. (Rob, Dmitry)
|
||||
|
||||
- Added GMP_VERSION constant. (Tony)
|
||||
- Added --ri switch to CLI which allows to check extension information. (Marcus)
|
||||
- Added tidyNode::getParent() method (John, Nuno)
|
||||
- Added openbasedir and safemode checks in zip:// stream wrapper and
|
||||
ZipArchive::open (Pierre)
|
||||
- Added php_pdo_sqlite_external.dll, a version of the PDO SQLite driver that
|
||||
links against an external sqlite3.dll. This provides Windows users to upgrade
|
||||
their sqlite3 version outside of the PHP release cycle. (Wez, Edin)
|
||||
- Added linenumbers to array returned by token_get_all(). (Johannes)
|
||||
|
||||
- Upgraded SQLite 3 to version 3.3.16 (Ilia)
|
||||
- Upgraded libraries bundled in the Windows distribution. (Edin)
|
||||
. c-client (imap) to version 2006e
|
||||
. libpq (PostgreSQL) to version 8.2.3
|
||||
. libmysql (MySQL) to version 5.0.37
|
||||
. openssl to version 0.9.8e
|
||||
- Upgraded PCRE to version 7.0 (Nuno)
|
||||
|
||||
- Updated timezone database to version 2007.5. (Derick)
|
||||
|
||||
- Fixed commandline handling for CLI and CGI. (Marcus, Johannes)
|
||||
- Fixed iterator_apply() with a callback using __call(). (Johannes)
|
||||
- Fixed possible multi bytes issues in openssl csr parser (Pierre)
|
||||
- Fixed shmop_open() with IPC_CREAT|IPC_EXCL flags on Windows.
|
||||
(Vladimir Kamaev, Tony).
|
||||
- Fixed possible leak in ZipArchive::extractTo when safemode checks fails (Ilia)
|
||||
- Fixed possible relative path issues in zip_open and TS mode (old API) (Pierre)
|
||||
- Fixed zend_llist_remove_tail (Michael Wallner, Dmitry)
|
||||
- Fixed a thread safety issue in gd gif read code (Nuno, Roman Nemecek)
|
||||
- Fixed CVE-2007-1001, GD wbmp used with invalid image size (Pierre)
|
||||
- Fixed unallocated memory access/double free in in array_user_key_compare()
|
||||
(MOPB-24 by Stefan Esser) (Stas)
|
||||
- Fixed wrong length calculation in unserialize S type
|
||||
(MOPB-29 by Stefan Esser) (Stas)
|
||||
|
||||
- Fixed bug #41215 (setAttribute return code reversed). (Ilia)
|
||||
- Fixed bug #41192 (Per Directory Values only work for one key). (Dmitry)
|
||||
- Fixed bug #41175 (addAttribute() fails to add an attribute with an empty
|
||||
value). (Ilia)
|
||||
- Fixed bug #41159 (mysql_pconnect() hash does not account for connect
|
||||
flags). (Ilia)
|
||||
- Fixed bug #41121 (range() overflow handling for large numbers on 32bit
|
||||
machines). (Ilia)
|
||||
- Fixed bug #41118 (PHP does not handle overflow of octal integers). (Tony)
|
||||
- Fixed bug #41109 (recursiveiterator.inc says "implements" Iterator instead of
|
||||
"extends"). (Marcus)
|
||||
- Fixed bug #40130 (TTF usage doesn't work properly under Netware). (Scott,
|
||||
gk at gknw dot de)
|
||||
- Fixed bug #41093 (magic_quotes_gpc ignores first arrays keys). (Arpad, Ilia)
|
||||
- Fixed bug #41075 (memleak when creating default object caused exception).
|
||||
(Dmitry)
|
||||
- Fixed bug #41067 (json_encode() problem with UTF-16 input). (jp at df5ea
|
||||
dot net. Ilia)
|
||||
- Fixed bug #41063 (chdir doesn't like root paths). (Dmitry)
|
||||
- Fixed bug #41061 ("visibility error" in ReflectionFunction::export()).
|
||||
(Johannes)
|
||||
- Fixed bug #41043 (pdo_oci crash when freeing error text with persistent
|
||||
connection). (Tony)
|
||||
- Fixed bug #41037 (unregister_tick_function() inside the tick function crash PHP).
|
||||
(Tony)
|
||||
- Fixed bug #41034 (json_encode() ignores null byte started keys in arrays).
|
||||
(Ilia)
|
||||
- Fixed bug #41026 (segfault when calling "self::method()" in shutdown functions).
|
||||
(Tony)
|
||||
- Fixed bug #40999 (mcrypt_create_iv() not using random seed). (Ilia)
|
||||
- Fixed bug #40998 (long session array keys are truncated). (Tony)
|
||||
- Implement feature request #40947, allow a single filter as argument
|
||||
for filter_var_array (Pierre)
|
||||
- Fixed bug #40935 (pdo_mysql does not raise an exception on empty
|
||||
fetchAll()). (Ilia)
|
||||
- Fixed bug #40931 (open_basedir bypass via symlink and move_uploaded_file()).
|
||||
(Tony)
|
||||
- Fixed bug #40921 (php_default_post_reader crashes when post_max_size is
|
||||
exceeded). (trickie at gmail dot com, Ilia)
|
||||
- Fixed bug #40915 (addcslashes unexpected behavior with binary input). (Tony)
|
||||
- Fixed bug #40899 (memory leak when nesting list()). (Dmitry)
|
||||
- Fixed bug #40897 (error_log file not locked). (Ilia)
|
||||
- Fixed bug #40883 (mysql_query() is allocating memory incorrectly). (Tony)
|
||||
- Fixed bug #40872 (inconsistency in offsetSet, offsetExists treatment of
|
||||
string enclosed integers). (Marcus)
|
||||
- Fixed bug #40861 (strtotime() doesn't handle double negative relative time
|
||||
units correctly). (Derick, Ilia)
|
||||
- Fixed bug #40854 (imap_mail_compose() creates an invalid terminator for
|
||||
multipart e-mails). (Ilia)
|
||||
- Fixed bug #40848 (sorting issue on 64-bit Solaris). (Wez)
|
||||
- Fixed bug #40836 (Segfault in ext/dom). (Rob)
|
||||
- Fixed bug #40833 (Crash when using unset() on an ArrayAccess object retrieved
|
||||
via __get()). (Dmitry)
|
||||
- Fixed bug #40822 (pdo_mysql does not return rowCount() on select). (Ilia)
|
||||
- Fixed bug #40815 (using strings like "class::func" and static methods in
|
||||
set_exception_handler() might result in crash). (Tony)
|
||||
- Fixed bug #40809 (Poor performance of ".="). (Dmitry)
|
||||
- Fixed bug #40805 (Failure executing function ibase_execute()). (Tony)
|
||||
- Fixed bug #40800 (cannot disable memory_limit with -1). (Dmitry, Tony)
|
||||
- Fixed bug #40794 (ReflectionObject::getValues() may crash when used with
|
||||
dynamic properties). (Tony)
|
||||
- Fixed bug #40784 (Case sensitivity in constructor's fallback). (Tony)
|
||||
- Fixed bug #40770 (Apache child exits when PHP memory limit reached). (Dmitry)
|
||||
- Fixed bug #40764 (line thickness not respected for horizontal and vertical
|
||||
lines). (Pierre)
|
||||
- Fixed bug #40758 (Test fcgi_is_fastcgi() is wrong on windows). (Dmitry)
|
||||
- Fixed bug #40754 (added substr() & substr_replace() overflow checks). (Ilia)
|
||||
- Fixed bug #40752 (parse_ini_file() segfaults when a scalar setting is
|
||||
redeclared as an array). (Tony)
|
||||
- Fixed bug #40750 (openssl stream wrapper ignores default_stream_timeout).
|
||||
(Tony)
|
||||
- Fixed bug #40727 (segfault in PDO when failed to bind parameters). (Tony)
|
||||
- Fixed bug #40709 (array_reduce() behaves strange with one item stored arrays).
|
||||
(Ilia)
|
||||
- Fixed bug #40703 (Resolved a possible namespace conflict between libxmlrpc
|
||||
and MySQL's NDB table handler). (Ilia)
|
||||
- Fixed bug #40961 (Incorrect results of DateTime equality check). (Mike)
|
||||
- Fixed bug #40678 (Cross compilation fails). (Tony)
|
||||
- Fixed bug #40621 (Crash when constructor called inappropriately). (Tony)
|
||||
- Fixed bug #40609 (Segfaults when using more than one SoapVar in a request).
|
||||
(Rob, Dmitry)
|
||||
- Fixed bug #40606 (umask is not being restored when request is finished).
|
||||
(Tony)
|
||||
- Fixed bug #40598 (libxml segfault). (Rob)
|
||||
- Fixed bug #40591 (list()="string"; gives invalid opcode). (Dmitry)
|
||||
- Fixed bug #40578 (imagettftext() multithreading issue). (Tony, Pierre)
|
||||
- Fixed bug #40576 (double values are truncated to 6 decimal digits when
|
||||
encoding). (Tony)
|
||||
- Fixed bug #40560 (DIR functions do not work on root UNC path). (Dmitry)
|
||||
- Fixed bug #40548 (SplFileInfo::getOwner/getGroup give a warning on broken
|
||||
symlink). (Marcus)
|
||||
- Fixed bug #40546 (SplFileInfo::getPathInfo() throws an exception if directory
|
||||
is in root dir). (Marcus)
|
||||
- Fixed bug #40545 (multithreading issue in zend_strtod()). (Tony)
|
||||
- Fixed bug #40503 (json_encode() value corruption on 32bit systems with
|
||||
overflown values). (Ilia)
|
||||
- Fixed bug #40467 (Partial SOAP request sent when XSD sequence or choice
|
||||
include minOccurs=0). (Dmitry)
|
||||
- Fixed bug #40465 (Ensure that all PHP elements are printed by var_dump).
|
||||
(wharmby at uk dot ibm dot com, Ilia)
|
||||
- Fixed bug #40464 (session.save_path wont use default-value when safe_mode
|
||||
or open_basedir is enabled). (Ilia)
|
||||
- Fixed bug #40455 (proc_open() uses wrong command line when safe_mode_exec_dir
|
||||
is set). (Tony)
|
||||
- Fixed bug #40432 (strip_tags() fails with greater than in attribute). (Ilia)
|
||||
- Fixed bug #40431 (dynamic properties may cause crash in ReflectionProperty
|
||||
methods). (Tony)
|
||||
- Fixed bug #40451 (addAttribute() may crash when used with non-existent child
|
||||
node). (Tony)
|
||||
- Fixed bug #40442 (ArrayObject::offsetExists broke in 5.2.1, works in 5.2.0).
|
||||
(olivier at elma dot fr, Marcus)
|
||||
- Fixed bug #40428 (imagepstext() doesn't accept optional parameter). (Pierre)
|
||||
- Fixed bug #40417 (Allow multiple instances of the same named PDO token in
|
||||
prepared statement emulation code). (Ilia)
|
||||
- Fixed bug #40414 (possible endless fork() loop when running fastcgi).
|
||||
(Dmitry)
|
||||
- Fixed bug #40410 (ext/posix does not compile on MacOS 10.3.9). (Tony)
|
||||
- Fixed bug #40392 (memory leaks in PHP milter SAPI).
|
||||
(tuxracer69 at gmail dot com, Tony)
|
||||
- Fixed bug #40371 (pg_client_encoding() not working on Windows). (Edin)
|
||||
- Fixed bug #40352 (FCGI_WEB_SERVER_ADDRS function get lost). (Dmitry)
|
||||
- Fixed bug #40290 (strtotime() returns unexpected result with particular
|
||||
timezone offset). (Derick)
|
||||
- Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when
|
||||
parent is killed). (Dmitry)
|
||||
- Fixed bug #40261 (Extremely slow data handling due to memory fragmentation).
|
||||
(Dmitry)
|
||||
- Fixed bug #40236 (php -a function allocation eats memory). (Dmitry)
|
||||
- Fixed bug #40109 (iptcembed fails on non-jfif jpegs). (Tony)
|
||||
- Fixed bug #39965 (Latitude and longitude are backwards in date_sun_info()).
|
||||
(Derick)
|
||||
- Implement #39867 (openssl PKCS#12 support) (Marc Delling, Pierre)
|
||||
- Fixed bug #39836 (SplObjectStorage empty after unserialize). (Marcus)
|
||||
- Fixed bug #39416 (Milliseconds in date()). (Derick)
|
||||
- Fixed bug #39396 (stream_set_blocking crashes on Win32). (Ilia, maurice at
|
||||
iceblog dot de)
|
||||
- Fixed bug #39351 (relative include fails on Solaris). (Dmitry, Tony)
|
||||
- Fixed bug #39322 (proc_terminate() destroys process resource). (Nuno)
|
||||
- Fixed bug #38406 (crash when assigning objects to SimpleXML attributes). (Tony)
|
||||
- Fixed bug #37799 (ftp_ssl_connect() falls back to non-ssl connection). (Nuno)
|
||||
- Fixed bug #36496 (SSL support in imap_open() not working on Windows). (Edin)
|
||||
- Fixed bug #36226 (Inconsistent handling when passing nillable arrays).
|
||||
(Dmitry)
|
||||
- Fixed bug #35872 (Avoid crash caused by object store being referenced during
|
||||
RSHUTDOWN). (Andy)
|
||||
- Fixed bug #34794 (proc_close() hangs when used with two processes).
|
||||
(jdolecek at netbsd dot org, Nuno)
|
||||
- Fixed PECL bug #10194 (crash in Oracle client when memory limit reached in
|
||||
the callback). (Tony)
|
||||
- Fixed substr_compare and substr_count information leak (MOPB-14) (Stas, Ilia)
|
||||
- Fixed crash on op-assign where argument is string offset (Brian, Stas)
|
||||
- Fixed bug #38710 (data leakage because of nonexisting boundary checking in
|
||||
statements in mysqli) (Stas)
|
||||
- Fixed bug #37386 (autocreating element doesn't assign value to first node).
|
||||
(Rob)
|
||||
- Fixed bug #37013 (server hangs when returning circular object references).
|
||||
(Dmitry)
|
||||
- Fixed bug #33664 Console window appears when using exec()
|
||||
(Richard Quadling, Stas)
|
||||
|
||||
|
||||
08 Feb 2007, PHP 5.2.1
|
||||
- Added read-timeout context option "timeout" for HTTP streams. (Hannes, Ilia).
|
||||
- Added CURLOPT_TCP_NODELAY constant to Curl extension. (Sara)
|
||||
@@ -666,7 +103,7 @@ PHP NEWS
|
||||
missing). (Tony)
|
||||
- Fixed bug #40285 (The PDO prepare parser goes into an infinite loop in
|
||||
some instances). (Ilia)
|
||||
- Fixed bug #40274 (Sessions fail with numeric root keys). (Ilia)
|
||||
- Fixed Bug #40274 (Sessions fail with numeric root keys). (Ilia)
|
||||
- Fixed bug #40259 (ob_start call many times - memory error). (Dmitry)
|
||||
- Fixed bug #40231 (file_exists incorrectly reports false). (Dmitry)
|
||||
- Fixed bug #40228 (ZipArchive::extractTo does create empty directories
|
||||
@@ -1497,7 +934,7 @@ PHP NEWS
|
||||
aborted" FastCGI err). (Dmitry)
|
||||
- Fixed bug #37192 (cc may complain about non-constant initializers in
|
||||
hash_adler.c). (Mike)
|
||||
- Fixed bug #37191 (chmod takes off sticky bit when safe_mode is On). (Tony)
|
||||
- Fixed bug #37191 (chmod takes off sticky bit when safe_mode is On). (Tony)
|
||||
- Fixed bug #37167 (PDO segfaults when throwing exception from the
|
||||
fetch handler). (Tony)
|
||||
- Fixed bug #37162 (wddx does not build as a shared extension).
|
||||
@@ -3022,3 +2459,4 @@ PHP NEWS
|
||||
- Fixed bug #28694 (ReflectionExtension::getFunctions() crashes PHP). (Marcus)
|
||||
- Fixed bug #28512 (Allocate enough space to store MSSQL data). (Frank)
|
||||
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
|
||||
|
||||
+4
-6
@@ -39,7 +39,9 @@ HEAD Will become PHP 6.0. This CVS branch is for active development.
|
||||
PHP_5_2 Is used to release the PHP 5.2.x series. Only minor feature
|
||||
enhancements may go in here, but please keep that as infrequent as
|
||||
possible.
|
||||
PHP_5_1 This branch is closed.
|
||||
PHP_5_1 Is used to release the PHP 5.1.x series. Only bugfixes are permitted
|
||||
on this branch (Consult the releasemaster prior to commit).
|
||||
PHP_5_0 This branch is closed.
|
||||
PHP_4_4 Is used to release the PHP 4.4.x series. Only bugfixes are permitted
|
||||
on this branch (Consult the releasemaster prior to commit).
|
||||
PHP_4_3 This branch is closed.
|
||||
@@ -98,13 +100,9 @@ For string.c:
|
||||
|
||||
The # lines will be omitted from the ChangeLog automagically.
|
||||
|
||||
Use the [DOC] tag in your log message whenever you feel that your changes
|
||||
imply a documentation modification. The php-doc team will automatically
|
||||
get notified about your commit through the php-doc mailing list.
|
||||
|
||||
If you fix some bugs, you should note the bug ID numbers in your
|
||||
commit message. Bug ID should be prefixed by "#" for easier access to
|
||||
bug report when developers are browsing CVS via LXR or Bonsai.
|
||||
bug report when developers are browsing CVS via. LXR or Bonsai.
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -96,6 +96,13 @@ ext/pcntl
|
||||
* Remove all zend_extension code
|
||||
* Add object callback support to pcntl_signal()
|
||||
|
||||
ext/pgsql
|
||||
---------
|
||||
For PHP 4.3.0:
|
||||
* Add pg_metadata() with metadata cache feature.
|
||||
* Add pg_convert() to check and convert array value for query.
|
||||
* Add pg_insert/pg_update/pg_delete/pg_select for simple query.
|
||||
|
||||
ext/session
|
||||
-----------
|
||||
For PHP 4.3.0:
|
||||
@@ -122,6 +129,7 @@ ext/standard
|
||||
ext/wddx
|
||||
--------
|
||||
* See if we can support the remaining data types:
|
||||
dateTime
|
||||
binary
|
||||
|
||||
http://www.wddx.org/WDDX_SDK_10a/7__References/WDDX_DTD.htm
|
||||
|
||||
@@ -48,6 +48,26 @@ Responsibility: Shane Caraveo & each sapi module owner
|
||||
Timeframe: ? (but shouldn't be much effort, most modules are probably ok)
|
||||
|
||||
|
||||
Component: Input Filtering
|
||||
- Implement a SAPI input filter hook that will get called
|
||||
just before registering a variable in the
|
||||
treat_data/post_handler hooks. (done)
|
||||
- Make sure this is also done in mbstring (done)
|
||||
- Provide access functions, or perhaps a new
|
||||
$_RAW_GET/POST/Cookie set of superglobals to get at the
|
||||
unfiltered data
|
||||
- Provide a .ini directive which allows people to set their
|
||||
input filter to one of the built-in strip_tags,
|
||||
htmlspecialchars or whatever other internal function might
|
||||
be useful here.
|
||||
- (The main benefit of this is to make it easier for people
|
||||
to solve the XSS problem once and for all without having
|
||||
to go through every line of their code and adding input
|
||||
validation/filtering everywhere)
|
||||
Responsibility: Rasmus
|
||||
Timeframe: Yesterday
|
||||
|
||||
|
||||
Component: RPC Abstraction Layer
|
||||
Porting java, com, dotnet, xmlrpc, corba, soap and python, srm
|
||||
(are there more ?) to work with the new oo api and preferably
|
||||
|
||||
+6
-11
@@ -13,11 +13,14 @@
|
||||
#ifndef TSRM_H
|
||||
#define TSRM_H
|
||||
|
||||
#if !defined(__CYGWIN__) && defined(WIN32)
|
||||
/* #ifndef WIN32 */
|
||||
#ifndef WIN32
|
||||
# include <tsrm_config.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# define TSRM_WIN32
|
||||
# include "tsrm_config.w32.h"
|
||||
#else
|
||||
# include <tsrm_config.h>
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
@@ -30,14 +33,6 @@
|
||||
# define TSRM_API
|
||||
#endif
|
||||
|
||||
#ifdef _WIN64
|
||||
typedef __int64 tsrm_intptr_t;
|
||||
typedef unsigned __int64 tsrm_uintptr_t;
|
||||
#else
|
||||
typedef long tsrm_intptr_t;
|
||||
typedef unsigned long tsrm_uintptr_t;
|
||||
#endif
|
||||
|
||||
/* Only compile multi-threading functions if we're in ZTS mode */
|
||||
#ifdef ZTS
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#ifndef TSRM_CONFIG_COMMON_H
|
||||
#define TSRM_CONFIG_COMMON_H
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
# if WINNT|WIN32
|
||||
# define TSRM_WIN32
|
||||
# endif
|
||||
#if WINNT|WIN32
|
||||
# define TSRM_WIN32
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
|
||||
+105
-202
@@ -136,7 +136,7 @@ static int php_check_dots(const char *element, int n)
|
||||
free((s)->cwd);
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */
|
||||
CWD_API int php_sys_stat(const char *path, struct stat *buf)
|
||||
{
|
||||
WIN32_FILE_ATTRIBUTE_DATA data;
|
||||
__int64 t;
|
||||
@@ -215,10 +215,9 @@ CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */
|
||||
buf->st_mtime = (unsigned long)((t / 10000000) - 11644473600);
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
static int php_is_dir_ok(const cwd_state *state) /* {{{ */
|
||||
static int php_is_dir_ok(const cwd_state *state)
|
||||
{
|
||||
struct stat buf;
|
||||
|
||||
@@ -227,9 +226,8 @@ static int php_is_dir_ok(const cwd_state *state) /* {{{ */
|
||||
|
||||
return (1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int php_is_file_ok(const cwd_state *state) /* {{{ */
|
||||
static int php_is_file_ok(const cwd_state *state)
|
||||
{
|
||||
struct stat buf;
|
||||
|
||||
@@ -238,9 +236,8 @@ static int php_is_file_ok(const cwd_state *state) /* {{{ */
|
||||
|
||||
return (1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */
|
||||
static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
|
||||
{
|
||||
CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state);
|
||||
cwd_globals->realpath_cache_size = 0;
|
||||
@@ -248,16 +245,14 @@ static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{
|
||||
cwd_globals->realpath_cache_ttl = REALPATH_CACHE_TTL;
|
||||
memset(cwd_globals->realpath_cache, 0, sizeof(cwd_globals->realpath_cache));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */
|
||||
static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
|
||||
{
|
||||
CWD_STATE_FREE(&cwd_globals->cwd);
|
||||
realpath_cache_clean(TSRMLS_C);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static char *tsrm_strndup(const char *s, size_t length) /* {{{ */
|
||||
static char *tsrm_strndup(const char *s, size_t length)
|
||||
{
|
||||
char *p;
|
||||
|
||||
@@ -271,9 +266,8 @@ static char *tsrm_strndup(const char *s, size_t length) /* {{{ */
|
||||
p[length]=0;
|
||||
return p;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API void virtual_cwd_startup(void) /* {{{ */
|
||||
CWD_API void virtual_cwd_startup(void)
|
||||
{
|
||||
char cwd[MAXPATHLEN];
|
||||
char *result;
|
||||
@@ -308,9 +302,8 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
|
||||
cwd_mutex = tsrm_mutex_alloc();
|
||||
#endif
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API void virtual_cwd_shutdown(void) /* {{{ */
|
||||
CWD_API void virtual_cwd_shutdown(void)
|
||||
{
|
||||
#ifndef ZTS
|
||||
cwd_globals_dtor(&cwd_globals TSRMLS_CC);
|
||||
@@ -321,9 +314,8 @@ CWD_API void virtual_cwd_shutdown(void) /* {{{ */
|
||||
|
||||
free(main_cwd_state.cwd); /* Don't use CWD_STATE_FREE because the non global states will probably use emalloc()/efree() */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC) /* {{{ */
|
||||
CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC)
|
||||
{
|
||||
cwd_state *state;
|
||||
|
||||
@@ -355,10 +347,10 @@ CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC) /* {{{ */
|
||||
*length = state->cwd_length;
|
||||
return strdup(state->cwd);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* Same semantics as UNIX getcwd() */
|
||||
CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC) /* {{{ */
|
||||
CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC)
|
||||
{
|
||||
size_t length;
|
||||
char *cwd;
|
||||
@@ -377,9 +369,8 @@ CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC) /* {{{ */
|
||||
free(cwd);
|
||||
return buf;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline unsigned long realpath_cache_key(const char *path, int path_len) /* {{{ */
|
||||
static inline unsigned long realpath_cache_key(const char *path, int path_len)
|
||||
{
|
||||
register unsigned long h;
|
||||
const char *e = path + path_len;
|
||||
@@ -391,9 +382,8 @@ static inline unsigned long realpath_cache_key(const char *path, int path_len) /
|
||||
|
||||
return h;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API void realpath_cache_clean(TSRMLS_D) /* {{{ */
|
||||
CWD_API void realpath_cache_clean(TSRMLS_D)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -408,9 +398,8 @@ CWD_API void realpath_cache_clean(TSRMLS_D) /* {{{ */
|
||||
}
|
||||
CWDG(realpath_cache_size) = 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC) /* {{{ */
|
||||
CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC)
|
||||
{
|
||||
unsigned long key = realpath_cache_key(path, path_len);
|
||||
unsigned long n = key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0]));
|
||||
@@ -429,9 +418,8 @@ CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC) /* {{{
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline void realpath_cache_add(const char *path, int path_len, const char *realpath, int realpath_len, time_t t TSRMLS_DC) /* {{{ */
|
||||
static inline void realpath_cache_add(const char *path, int path_len, const char *realpath, int realpath_len, time_t t TSRMLS_DC)
|
||||
{
|
||||
long size = sizeof(realpath_cache_bucket) + path_len + 1 + realpath_len + 1;
|
||||
if (CWDG(realpath_cache_size) + size <= CWDG(realpath_cache_size_limit)) {
|
||||
@@ -452,9 +440,8 @@ static inline void realpath_cache_add(const char *path, int path_len, const char
|
||||
CWDG(realpath_cache_size) += size;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline realpath_cache_bucket* realpath_cache_find(const char *path, int path_len, time_t t TSRMLS_DC) /* {{{ */
|
||||
static inline realpath_cache_bucket* realpath_cache_find(const char *path, int path_len, time_t t TSRMLS_DC)
|
||||
{
|
||||
unsigned long key = realpath_cache_key(path, path_len);
|
||||
unsigned long n = key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0]));
|
||||
@@ -475,11 +462,11 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* Resolve path relatively to state and put the real path into state */
|
||||
/* returns 0 for ok, 1 for error */
|
||||
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath) /* {{{ */
|
||||
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath)
|
||||
{
|
||||
int path_length = strlen(path);
|
||||
cwd_state old_state;
|
||||
@@ -487,14 +474,10 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
realpath_cache_bucket *bucket;
|
||||
time_t t = 0;
|
||||
int ret;
|
||||
int use_cache;
|
||||
int use_relative_path = 0;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
use_cache = ((use_realpath != CWD_EXPAND) && CWDG(realpath_cache_size_limit));
|
||||
|
||||
if (path_length == 0)
|
||||
return (1);
|
||||
return (0);
|
||||
if (path_length >= MAXPATHLEN)
|
||||
return (1);
|
||||
|
||||
@@ -505,33 +488,28 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
/* cwd_length can be 0 when getcwd() fails.
|
||||
* This can happen under solaris when a dir does not have read permissions
|
||||
* but *does* have execute permissions */
|
||||
if (!IS_ABSOLUTE_PATH(path, path_length)) {
|
||||
if (state->cwd_length == 0) {
|
||||
use_cache = 0;
|
||||
use_relative_path = 1;
|
||||
} else {
|
||||
int orig_path_len;
|
||||
int state_cwd_length = state->cwd_length;
|
||||
if (!IS_ABSOLUTE_PATH(path, path_length) && (state->cwd_length > 0)) {
|
||||
int orig_path_len;
|
||||
int state_cwd_length = state->cwd_length;
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
if (IS_SLASH(path[0])) {
|
||||
state_cwd_length = 2;
|
||||
}
|
||||
#endif
|
||||
orig_path_len = path_length + state_cwd_length + 1;
|
||||
if (orig_path_len >= MAXPATHLEN) {
|
||||
return 1;
|
||||
}
|
||||
memcpy(orig_path, state->cwd, state_cwd_length);
|
||||
orig_path[state_cwd_length] = DEFAULT_SLASH;
|
||||
memcpy(orig_path + state_cwd_length + 1, path, path_length + 1);
|
||||
path = orig_path;
|
||||
path_length = orig_path_len;
|
||||
if (IS_SLASH(path[0])) {
|
||||
state_cwd_length = 2;
|
||||
}
|
||||
#endif
|
||||
orig_path_len = path_length + state_cwd_length + 1;
|
||||
if (orig_path_len >= MAXPATHLEN) {
|
||||
return 1;
|
||||
}
|
||||
memcpy(orig_path, state->cwd, state_cwd_length);
|
||||
orig_path[state_cwd_length] = DEFAULT_SLASH;
|
||||
memcpy(orig_path + state_cwd_length + 1, path, path_length + 1);
|
||||
path = orig_path;
|
||||
path_length = orig_path_len;
|
||||
}
|
||||
|
||||
if (use_cache) {
|
||||
t = CWDG(realpath_cache_ttl)?time(0):0;
|
||||
if (use_realpath != CWD_EXPAND && CWDG(realpath_cache_size_limit)) {
|
||||
t = CWDG(realpath_cache_ttl)?time(NULL):0;
|
||||
if ((bucket = realpath_cache_find(path, path_length, t TSRMLS_CC)) != NULL) {
|
||||
int len = bucket->realpath_len;
|
||||
|
||||
@@ -560,7 +538,6 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
}
|
||||
goto no_realpath;
|
||||
}
|
||||
use_realpath = CWD_REALPATH;
|
||||
CWD_STATE_COPY(&old_state, state);
|
||||
|
||||
state->cwd_length = strlen(resolved_path);
|
||||
@@ -571,26 +548,18 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
#endif
|
||||
} else {
|
||||
char *ptr, *path_copy, *free_path;
|
||||
char *tok;
|
||||
char *tok = NULL;
|
||||
int ptr_length;
|
||||
#ifdef TSRM_WIN32
|
||||
int is_unc;
|
||||
int is_unc = 0;
|
||||
#endif
|
||||
no_realpath:
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
if (memchr(path, '*', path_length) ||
|
||||
memchr(path, '?', path_length)) {
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
no_realpath:
|
||||
|
||||
free_path = path_copy = tsrm_strndup(path, path_length);
|
||||
CWD_STATE_COPY(&old_state, state);
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
ret = 0;
|
||||
is_unc = 0;
|
||||
#ifdef TSRM_WIN32
|
||||
if (path_length >= 2 && path[1] == ':') {
|
||||
state->cwd = (char *) realloc(state->cwd, 2 + 1);
|
||||
state->cwd[0] = toupper(path[0]);
|
||||
@@ -614,7 +583,6 @@ no_realpath:
|
||||
}
|
||||
#endif
|
||||
|
||||
tok = NULL;
|
||||
ptr = tsrm_strtok_r(path_copy, TOKENIZER_STRING, &tok);
|
||||
while (ptr) {
|
||||
ptr_length = strlen(ptr);
|
||||
@@ -622,12 +590,6 @@ no_realpath:
|
||||
if (IS_DIRECTORY_UP(ptr, ptr_length)) {
|
||||
char save;
|
||||
|
||||
if (use_relative_path) {
|
||||
CWD_STATE_FREE(state);
|
||||
*state = old_state;
|
||||
return 1;
|
||||
}
|
||||
|
||||
save = DEFAULT_SLASH;
|
||||
|
||||
#define PREVIOUS state->cwd[state->cwd_length - 1]
|
||||
@@ -647,38 +609,33 @@ no_realpath:
|
||||
state->cwd_length--;
|
||||
}
|
||||
} else if (!IS_DIRECTORY_CURRENT(ptr, ptr_length)) {
|
||||
if (use_relative_path) {
|
||||
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1);
|
||||
use_relative_path = 0;
|
||||
} else {
|
||||
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
|
||||
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
|
||||
#ifdef TSRM_WIN32
|
||||
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
|
||||
if (state->cwd_length < 2 ||
|
||||
(state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
|
||||
IsDBCSLeadByte(state->cwd[state->cwd_length-2])) {
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
}
|
||||
#elif defined(NETWARE)
|
||||
/*
|
||||
Below code keeps appending to state->cwd a File system seperator
|
||||
cases where this appending should not happen is given below,
|
||||
a) sys: should just be left as it is
|
||||
b) sys:system should just be left as it is,
|
||||
Colon is allowed only in the first token as volume names alone can have the : in their names.
|
||||
Files and Directories cannot have : in their names
|
||||
So the check goes like this,
|
||||
For second token and above simply append the DEFAULT_SLASH to the state->cwd.
|
||||
For first token check for the existence of :
|
||||
if it exists don't append the DEFAULT_SLASH to the state->cwd.
|
||||
*/
|
||||
if(((state->cwd_length == 0) && (strchr(ptr, ':') == NULL)) || (state->cwd_length > 0)) {
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
}
|
||||
#else
|
||||
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
|
||||
if (state->cwd_length < 2 ||
|
||||
(state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
|
||||
IsDBCSLeadByte(state->cwd[state->cwd_length-2])) {
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
#endif
|
||||
}
|
||||
#elif defined(NETWARE)
|
||||
/*
|
||||
Below code keeps appending to state->cwd a File system seperator
|
||||
cases where this appending should not happen is given below,
|
||||
a) sys: should just be left as it is
|
||||
b) sys:system should just be left as it is,
|
||||
Colon is allowed only in the first token as volume names alone can have the : in their names.
|
||||
Files and Directories cannot have : in their names
|
||||
So the check goes like this,
|
||||
For second token and above simply append the DEFAULT_SLASH to the state->cwd.
|
||||
For first token check for the existence of :
|
||||
if it exists don't append the DEFAULT_SLASH to the state->cwd.
|
||||
*/
|
||||
if(((state->cwd_length == 0) && (strchr(ptr, ':') == NULL)) || (state->cwd_length > 0)) {
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
}
|
||||
#else
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
#endif
|
||||
memcpy(&state->cwd[state->cwd_length], ptr, ptr_length+1);
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
@@ -695,14 +652,14 @@ no_realpath:
|
||||
memcpy(&state->cwd[state->cwd_length], data.cFileName, length+1);
|
||||
ptr_length = length;
|
||||
FindClose(hFind);
|
||||
ret = 0;
|
||||
} else if (use_realpath == CWD_REALPATH) {
|
||||
if (is_unc) {
|
||||
/* skip share name */
|
||||
is_unc--;
|
||||
ret = 0;
|
||||
} else {
|
||||
ret = 1;
|
||||
free(free_path);
|
||||
CWD_STATE_FREE(state);
|
||||
*state = old_state;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -712,24 +669,9 @@ no_realpath:
|
||||
}
|
||||
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
|
||||
}
|
||||
#if defined(TSRM_WIN32) || defined(NETWARE)
|
||||
if (path[path_length-1] == '\\' || path[path_length-1] == '/') {
|
||||
#else
|
||||
if (path[path_length-1] == '/') {
|
||||
#endif
|
||||
state->cwd = (char*)realloc(state->cwd, state->cwd_length + 2);
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
state->cwd[state->cwd_length] = 0;
|
||||
}
|
||||
|
||||
free(free_path);
|
||||
|
||||
if ((use_realpath == CWD_REALPATH) && ret) {
|
||||
CWD_STATE_FREE(state);
|
||||
*state = old_state;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) {
|
||||
state->cwd = (char *) realloc(state->cwd, state->cwd_length+1+1);
|
||||
state->cwd[state->cwd_length] = DEFAULT_SLASH;
|
||||
@@ -738,7 +680,7 @@ no_realpath:
|
||||
}
|
||||
}
|
||||
|
||||
if (use_cache && (use_realpath == CWD_REALPATH)) {
|
||||
if (use_realpath != CWD_EXPAND && CWDG(realpath_cache_size_limit)) {
|
||||
realpath_cache_add(path, path_length, state->cwd, state->cwd_length, t TSRMLS_CC);
|
||||
}
|
||||
|
||||
@@ -756,15 +698,13 @@ no_realpath:
|
||||
#endif
|
||||
return (ret);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int virtual_chdir(const char *path TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_chdir(const char *path TSRMLS_DC)
|
||||
{
|
||||
return virtual_file_ex(&CWDG(cwd), path, php_is_dir_ok, CWD_REALPATH)?-1:0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC)
|
||||
{
|
||||
int length = strlen(path);
|
||||
char *temp;
|
||||
@@ -795,29 +735,13 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
|
||||
tsrm_free_alloca(temp);
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{ */
|
||||
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
char *retval;
|
||||
char cwd[MAXPATHLEN];
|
||||
|
||||
/* realpath("") returns CWD */
|
||||
if (!*path) {
|
||||
new_state.cwd = (char*)malloc(1);
|
||||
new_state.cwd[0] = '\0';
|
||||
new_state.cwd_length = 0;
|
||||
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
|
||||
path = cwd;
|
||||
}
|
||||
} else if (!IS_ABSOLUTE_PATH(path, strlen(path))) {
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
} else {
|
||||
new_state.cwd = (char*)malloc(1);
|
||||
new_state.cwd[0] = '\0';
|
||||
new_state.cwd_length = 0;
|
||||
}
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
|
||||
if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)==0) {
|
||||
int len = new_state.cwd_length>MAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length;
|
||||
@@ -833,9 +757,8 @@ CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC) /* {
|
||||
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
@@ -848,15 +771,13 @@ CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_f
|
||||
return retval;
|
||||
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int virtual_filepath(const char *path, char **filepath TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_filepath(const char *path, char **filepath TSRMLS_DC)
|
||||
{
|
||||
return virtual_filepath_ex(path, filepath, php_is_file_ok TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC) /* {{{ */
|
||||
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
FILE *f;
|
||||
@@ -876,9 +797,8 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC) /* {{{
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return f;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int ret;
|
||||
@@ -899,10 +819,10 @@ CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC) /* {{{ */
|
||||
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
#if HAVE_UTIME
|
||||
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int ret;
|
||||
@@ -918,10 +838,9 @@ CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC) /
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int ret;
|
||||
@@ -937,10 +856,9 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC) /* {{{ */
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int ret;
|
||||
@@ -964,10 +882,9 @@ CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int li
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...) /* {{{ */
|
||||
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int f;
|
||||
@@ -993,9 +910,8 @@ CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...) /* {{{ */
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return f;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int f;
|
||||
@@ -1011,23 +927,22 @@ CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC) /* {{{ */
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return f;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC)
|
||||
{
|
||||
cwd_state old_state;
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
|
||||
CWD_STATE_COPY(&old_state, &CWDG(cwd));
|
||||
if (virtual_file_ex(&old_state, oldname, NULL, CWD_EXPAND)) {
|
||||
if (virtual_file_ex(&old_state, oldname, NULL, CWD_REALPATH)) {
|
||||
CWD_STATE_FREE(&old_state);
|
||||
return -1;
|
||||
}
|
||||
oldname = old_state.cwd;
|
||||
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
if (virtual_file_ex(&new_state, newname, NULL, CWD_EXPAND)) {
|
||||
if (virtual_file_ex(&new_state, newname, NULL, CWD_FILEPATH)) {
|
||||
CWD_STATE_FREE(&old_state);
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return -1;
|
||||
@@ -1041,9 +956,8 @@ CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC) /* {{{ */
|
||||
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
@@ -1059,16 +973,15 @@ CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#if !defined(TSRM_WIN32)
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
if (virtual_file_ex(&new_state, path, NULL, CWD_EXPAND)) {
|
||||
if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)) {
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return -1;
|
||||
}
|
||||
@@ -1078,10 +991,9 @@ CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ *
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
CWD_API int virtual_unlink(const char *path TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_unlink(const char *path TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
@@ -1097,9 +1009,8 @@ CWD_API int virtual_unlink(const char *path TSRMLS_DC) /* {{{ */
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
@@ -1118,9 +1029,8 @@ CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC) /* {{{ */
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC) /* {{{ */
|
||||
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
@@ -1136,13 +1046,12 @@ CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC) /* {{{ */
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
DIR *opendir(const char *name);
|
||||
#endif
|
||||
|
||||
CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC) /* {{{ */
|
||||
CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
DIR *retval;
|
||||
@@ -1158,19 +1067,20 @@ CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC) /* {{{ */
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /* {{{ */
|
||||
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
{
|
||||
return popen_ex(command, type, CWDG(cwd).cwd, NULL);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#elif defined(NETWARE)
|
||||
|
||||
/* On NetWare, the trick of prepending "cd cwd; " doesn't work so we need to perform
|
||||
a VCWD_CHDIR() and mutex it
|
||||
*/
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /* {{{ */
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
{
|
||||
char prev_cwd[MAXPATHLEN];
|
||||
char *getcwd_result;
|
||||
@@ -1195,9 +1105,10 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /*
|
||||
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#else /* Unix */
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /* {{{ */
|
||||
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
{
|
||||
int command_length;
|
||||
int dir_length, extra = 0;
|
||||
@@ -1254,23 +1165,15 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /*
|
||||
free(command_line);
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#endif
|
||||
|
||||
CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{ */
|
||||
CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
char cwd[MAXPATHLEN];
|
||||
|
||||
/* realpath("") returns CWD */
|
||||
if (!*path) {
|
||||
new_state.cwd = (char*)malloc(1);
|
||||
new_state.cwd[0] = '\0';
|
||||
new_state.cwd_length = 0;
|
||||
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
|
||||
path = cwd;
|
||||
}
|
||||
} else if (!IS_ABSOLUTE_PATH(path, strlen(path)) &&
|
||||
if (!IS_ABSOLUTE_PATH(path, strlen(path)) &&
|
||||
VCWD_GETCWD(cwd, MAXPATHLEN)) {
|
||||
new_state.cwd = strdup(cwd);
|
||||
new_state.cwd_length = strlen(cwd);
|
||||
@@ -1295,7 +1198,7 @@ CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{
|
||||
return new_state.cwd;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||
+6
-7
@@ -219,7 +219,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
|
||||
|
||||
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c "));
|
||||
sprintf(cmd, "%s /c %s", TWG(comspec), command);
|
||||
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, env, cwd, &startup, &process)) {
|
||||
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS, env, cwd, &startup, &process)) {
|
||||
return NULL;
|
||||
}
|
||||
free(cmd);
|
||||
@@ -228,10 +228,10 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
|
||||
proc = process_get(NULL TSRMLS_CC);
|
||||
|
||||
if (read) {
|
||||
fno = _open_osfhandle((tsrm_intptr_t)in, _O_RDONLY | mode);
|
||||
fno = _open_osfhandle((long)in, _O_RDONLY | mode);
|
||||
CloseHandle(out);
|
||||
} else {
|
||||
fno = _open_osfhandle((tsrm_intptr_t)out, _O_WRONLY | mode);
|
||||
fno = _open_osfhandle((long)out, _O_WRONLY | mode);
|
||||
CloseHandle(in);
|
||||
}
|
||||
|
||||
@@ -280,6 +280,9 @@ TSRM_API int shmget(int key, int size, int flags)
|
||||
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
|
||||
|
||||
if ((!shm_handle && !info_handle)) {
|
||||
if (flags & IPC_EXCL) {
|
||||
return -1;
|
||||
}
|
||||
if (flags & IPC_CREAT) {
|
||||
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size, shm_segment);
|
||||
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), shm_info);
|
||||
@@ -288,10 +291,6 @@ TSRM_API int shmget(int key, int size, int flags)
|
||||
if ((!shm_handle || !info_handle)) {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
if (flags & IPC_EXCL) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
shm = shm_get(key, NULL);
|
||||
|
||||
+7
-28
@@ -1,34 +1,13 @@
|
||||
Zend Memory Manager
|
||||
===================
|
||||
The goal of the new memory manager (PHP 5.2 and later) is reducing memory allocation overhead and speedup memory management.
|
||||
|
||||
General:
|
||||
--------
|
||||
The new manager's "configure" has no "--disable-zend-memory-manager" option, but it has "--enable-malloc-mm" instead. It is enabled by default in DEBUG build and disabled by default in RELEASE built. It allows select malloc/emalloc at runtime. So you can use internal and external memory debuggers without recompilation.
|
||||
|
||||
The goal of the new memory manager (available since PHP 5.2) is to reduce memory
|
||||
allocation overhead and speedup memory management.
|
||||
$ sapi/cli/php -r 'leak();'
|
||||
|
||||
The new manager's "configure" has no "--disable-zend-memory-manager" option,
|
||||
but it has "--enable-malloc-mm" instead. It is enabled by default in DEBUG
|
||||
build and disabled by default in RELEASE build. when enabled it allows selecting
|
||||
between malloc and emalloc at runtime so you can use internal and external memory
|
||||
debuggers without recompilation.
|
||||
$ USE_ZEND_ALLOC=0 valgrind --leak-check=full -r 'leak();'
|
||||
|
||||
Debugging:
|
||||
----------
|
||||
The patch allows tweaking memory manager with ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE environment variables. Default values are "malloc" and "256K". Dependent on target system you can also use "mmap_anon", "mmap_zero"
|
||||
and "win32" storage managers.
|
||||
|
||||
Normal:
|
||||
$ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php
|
||||
|
||||
$ sapi/cli/php -r 'leak();'
|
||||
|
||||
Zend MM disabled:
|
||||
|
||||
$ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'
|
||||
|
||||
Tweaking:
|
||||
---------
|
||||
|
||||
The Zend MM can be tweaked using ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE environment
|
||||
variables. Default values are "malloc" and "256K". Dependent on target system you
|
||||
can also use "mmap_anon", "mmap_zero" and "win32" storage managers.
|
||||
|
||||
$ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php ..etc.
|
||||
+4
-8
@@ -10,11 +10,9 @@ var_dump(get_resource_type($fp));
|
||||
fclose($fp);
|
||||
var_dump(get_resource_type($fp));
|
||||
|
||||
var_dump(get_loaded_extensions(true));
|
||||
var_dump(gettype(get_loaded_extensions()));
|
||||
var_dump(count(get_loaded_extensions()));
|
||||
var_dump(gettype(get_loaded_extensions(true)));
|
||||
var_dump(count(get_loaded_extensions(true)));
|
||||
var_dump(get_loaded_extensions(true, true));
|
||||
|
||||
define("USER_CONSTANT", "test");
|
||||
|
||||
@@ -52,13 +50,11 @@ Warning: Supplied argument is not a valid resource handle in %s on line %d
|
||||
bool(false)
|
||||
string(6) "stream"
|
||||
string(7) "Unknown"
|
||||
string(5) "array"
|
||||
int(%d)
|
||||
string(5) "array"
|
||||
int(%d)
|
||||
|
||||
Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d
|
||||
Warning: Wrong parameter count for get_loaded_extensions() in %s on line %d
|
||||
NULL
|
||||
string(5) "array"
|
||||
int(%d)
|
||||
|
||||
Warning: Wrong parameter count for get_defined_constants() in %s on line %d
|
||||
NULL
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
--TEST--
|
||||
constant() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(constant());
|
||||
var_dump(constant("", ""));
|
||||
var_dump(constant(""));
|
||||
|
||||
var_dump(constant(array()));
|
||||
|
||||
define("TEST_CONST", 1);
|
||||
var_dump(constant("TEST_CONST"));
|
||||
|
||||
define("TEST_CONST2", "test");
|
||||
var_dump(constant("TEST_CONST2"));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Wrong parameter count for constant() in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Wrong parameter count for constant() in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: constant(): Couldn't find constant in %s on line %d
|
||||
NULL
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
|
||||
Warning: constant(): Couldn't find constant Array in %s on line %d
|
||||
NULL
|
||||
int(1)
|
||||
string(4) "test"
|
||||
Done
|
||||
-1332
File diff suppressed because it is too large.
Load diff
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
func_get_arg() invalid usage
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(func_get_arg(1,2,3));
|
||||
var_dump(func_get_arg(1));
|
||||
var_dump(func_get_arg());
|
||||
|
||||
function bar() {
|
||||
var_dump(func_get_arg(1));
|
||||
}
|
||||
|
||||
function foo() {
|
||||
bar(func_get_arg(1));
|
||||
}
|
||||
|
||||
foo(1,2);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
|
||||
Warning: func_get_arg(): Called from the global scope - no function context in %s on line %d
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
Done
|
||||
@@ -1,73 +0,0 @@
|
||||
--TEST--
|
||||
adding arrays
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = array(1,2,3);
|
||||
$b = array("str", "here");
|
||||
|
||||
$c = $a + $b;
|
||||
var_dump($c);
|
||||
|
||||
$a = array(1,2,3);
|
||||
$b = array(1,2,4);
|
||||
|
||||
$c = $a + $b;
|
||||
var_dump($c);
|
||||
|
||||
$a = array("a"=>"aaa",2,3);
|
||||
$b = array(1,2,"a"=>"bbbbbb");
|
||||
|
||||
$c = $a + $b;
|
||||
var_dump($c);
|
||||
|
||||
$a += $b;
|
||||
var_dump($c);
|
||||
|
||||
$a += $a;
|
||||
var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
array(3) {
|
||||
["a"]=>
|
||||
string(3) "aaa"
|
||||
[0]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(3)
|
||||
}
|
||||
array(3) {
|
||||
["a"]=>
|
||||
string(3) "aaa"
|
||||
[0]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(3)
|
||||
}
|
||||
array(3) {
|
||||
["a"]=>
|
||||
string(3) "aaa"
|
||||
[0]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(3)
|
||||
}
|
||||
Done
|
||||
@@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
adding objects to arrays
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = array(1,2,3);
|
||||
|
||||
$o = new stdclass;
|
||||
$o->prop = "value";
|
||||
|
||||
$c = $a + $o;
|
||||
var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
|
||||
Fatal error: Unsupported operand types in %s on line %d
|
||||
@@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
adding arrays to objects
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = array(1,2,3);
|
||||
|
||||
$o = new stdclass;
|
||||
$o->prop = "value";
|
||||
|
||||
$c = $o + $a;
|
||||
var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
|
||||
Fatal error: Unsupported operand types in %s on line %d
|
||||
@@ -1,14 +0,0 @@
|
||||
--TEST--
|
||||
adding numbers to arrays
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = array(1,2,3);
|
||||
|
||||
$c = $a + 5;
|
||||
var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Unsupported operand types in %s on line %d
|
||||
@@ -1,22 +0,0 @@
|
||||
--TEST--
|
||||
adding integers to doubles
|
||||
--INI--
|
||||
precision=14
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$i = 75636;
|
||||
$d = 2834681123.123123;
|
||||
|
||||
$c = $i + $d;
|
||||
var_dump($c);
|
||||
|
||||
$c = $d + $i;
|
||||
var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
float(2834756759.1231)
|
||||
float(2834756759.1231)
|
||||
Done
|
||||
@@ -1,49 +0,0 @@
|
||||
--TEST--
|
||||
adding numbers to strings
|
||||
--INI--
|
||||
precision=14
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$i = 75636;
|
||||
$s1 = "this is a string";
|
||||
$s2 = "876222numeric";
|
||||
$s3 = "48474874";
|
||||
$s4 = "25.68";
|
||||
|
||||
$c = $i + $s1;
|
||||
var_dump($c);
|
||||
|
||||
$c = $i + $s2;
|
||||
var_dump($c);
|
||||
|
||||
$c = $i + $s3;
|
||||
var_dump($c);
|
||||
|
||||
$c = $i + $s4;
|
||||
var_dump($c);
|
||||
|
||||
$c = $s1 + $i;
|
||||
var_dump($c);
|
||||
|
||||
$c = $s2 + $i;
|
||||
var_dump($c);
|
||||
|
||||
$c = $s3 + $i;
|
||||
var_dump($c);
|
||||
|
||||
$c = $s4 + $i;
|
||||
var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(75636)
|
||||
int(951858)
|
||||
int(48550510)
|
||||
float(75661.68)
|
||||
int(75636)
|
||||
int(951858)
|
||||
int(48550510)
|
||||
float(75661.68)
|
||||
Done
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
adding strings to arrays
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = array(1,2,3);
|
||||
|
||||
$s1 = "some string";
|
||||
|
||||
$c = $a + $s1;
|
||||
var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Unsupported operand types in %s on line %d
|
||||
@@ -1,39 +0,0 @@
|
||||
--TEST--
|
||||
bitwise AND and strings
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$s = "123";
|
||||
$s1 = "234";
|
||||
|
||||
var_dump($s & $s1);
|
||||
|
||||
$s = "test";
|
||||
$s1 = "some";
|
||||
|
||||
var_dump($s & $s1);
|
||||
|
||||
$s = "test long";
|
||||
$s1 = "some";
|
||||
|
||||
var_dump($s & $s1);
|
||||
|
||||
$s = "test";
|
||||
$s1 = "some long";
|
||||
|
||||
var_dump($s & $s1);
|
||||
|
||||
$s = "test";
|
||||
$s &= "some long";
|
||||
|
||||
var_dump($s);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(3) "020"
|
||||
string(4) "pead"
|
||||
string(4) "pead"
|
||||
string(4) "pead"
|
||||
string(4) "pead"
|
||||
Done
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Tests that array manipulation code is correctly dealing with copy on write and splitting on reference
|
||||
--FILE--
|
||||
<?php
|
||||
$a=array();
|
||||
$b=1;
|
||||
$c=&$b;
|
||||
$a[]=$b;
|
||||
$b=2;
|
||||
var_dump ($a);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Tests that array unshift code is correctly dealing with copy on write and splitting on reference
|
||||
--FILE--
|
||||
<?php
|
||||
$a=array();
|
||||
$b=1;
|
||||
$c=&$b;
|
||||
array_unshift ($a,$b);
|
||||
$b=2;
|
||||
var_dump ($a);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #22725 (A derived class can call a parent's protected method that calls a private method)
|
||||
bug #22725 (A derived class can call a parent's protected method that calls a private method)
|
||||
--SKIPIF--
|
||||
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #27304 (Static functions don't function properly)
|
||||
Bug #27304
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -49,12 +49,12 @@ array(1) {
|
||||
}
|
||||
Base::__construct
|
||||
array(3) {
|
||||
["Baz"]=>
|
||||
int(4)
|
||||
["Foo"]=>
|
||||
int(1)
|
||||
["Bar"]=>
|
||||
int(2)
|
||||
["Baz"]=>
|
||||
int(3)
|
||||
}
|
||||
Child::__construct
|
||||
array(3) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #29104 (Function declaration in method doesn't work)
|
||||
Bug #29104 Function declaration in method doesn't work
|
||||
--FILE--
|
||||
<?php
|
||||
class A
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #29210 (Function is_callable does not support private and protected methods)
|
||||
Bug #29210 Function: is_callable - no support for private and protected classes
|
||||
--FILE--
|
||||
<?php
|
||||
class test_class {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #30519 (Interface not existing says Class not found)
|
||||
Bug #30519 Interface not existing says Class not found
|
||||
--FILE--
|
||||
<?php
|
||||
class test implements a {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #30702 (cannot initialize class variable from class constant)
|
||||
Bug #30702 cannot initialize class variable from class constant
|
||||
--FILE--
|
||||
<?php
|
||||
class foo {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #30791 (magic methods (__sleep/__wakeup/__toString) call __call if object is overloaded)
|
||||
Bug #30791 magic methods (__sleep/__wakeup/__toString) call __call if object is overloaded
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #30889 (Conflict between __get/__set and ++ operator)
|
||||
Bug #30889 Conflict between __get/__set and ++ operator
|
||||
--FILE--
|
||||
<?php
|
||||
class overloaded
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #32296 (get_class_methods output has changed between 5.0.2 and 5.0.3)
|
||||
Bug #32296 get_class_methods output has changed between 5.0.2 and 5.0.3
|
||||
--FILE--
|
||||
<?php
|
||||
abstract class space{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #32427 (Interfaces are not allowed 'static' access modifier)
|
||||
Bug #32427 Interfaces are not allowed 'static' access modifier
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #32660 (Assignment by reference causes crash when field access is overloaded (__get))
|
||||
Bug #32660 Assignment by reference causes crash when field access is overloaded (__get)
|
||||
--FILE--
|
||||
<?php
|
||||
class A
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #32674 (exception in iterator causes crash)
|
||||
Bug #32674 exception in iterator causes crash
|
||||
--FILE--
|
||||
<?php
|
||||
class collection implements Iterator {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #32833 (Invalid opcode with $a[] .= '')
|
||||
Bug #32833 Invalid opcode
|
||||
--FILE--
|
||||
<?php
|
||||
$test = array();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #33257 (array_splice() inconsistent when passed function instead of variable)
|
||||
Bug #33257 array_splice() inconsistent when passed function instead of variable
|
||||
--INI--
|
||||
error_reporting=4095
|
||||
--FILE--
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #34712 (zend.ze1_compatibility_mode = on segfault)
|
||||
Bug #34712 zend.ze1_compatibility_mode = on segfault
|
||||
--INI--
|
||||
zend.ze1_compatibility_mode=1
|
||||
error_reporting=4095
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #35437 (Segfault or Invalid Opcode 137/1/4)
|
||||
Bug #35437 Segfault or Invalid Opcode 137/1/4
|
||||
--FILE--
|
||||
<?php
|
||||
function err2exception($errno, $errstr)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #37212 (Access to protected property of common base class)
|
||||
Bug #3721 (Access to protected property of common base class)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
--TEST--
|
||||
Bug #37715 (array pointers resetting on copy)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array(
|
||||
'a' => array(
|
||||
'A', 'B', 'C', 'D',
|
||||
),
|
||||
'b' => array(
|
||||
'AA', 'BB', 'CC', 'DD',
|
||||
),
|
||||
);
|
||||
|
||||
// Set the pointer of $a to 'b' and the pointer of 'b' to 'CC'
|
||||
reset($a);
|
||||
next($a);
|
||||
next($a['b']);
|
||||
next($a['b']);
|
||||
next($a['b']);
|
||||
|
||||
var_dump(key($a['b']));
|
||||
foreach($a as $k => $d)
|
||||
{
|
||||
}
|
||||
// Alternatively $c = $a; and foreachloop removal will cause identical results.
|
||||
var_dump(key($a['b']));
|
||||
--EXPECT--
|
||||
int(3)
|
||||
int(3)
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #37811 (define not using toString on objects)
|
||||
Bug #37811 define not using toString on objects
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #38220 (Crash on some object operations)
|
||||
Bug #38220 Crash on some object operations
|
||||
--FILE--
|
||||
<?php
|
||||
class drv {
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Bug #39542 (Behaviour of require_once/include_once different to < 5.2.0)
|
||||
--FILE--
|
||||
<?php
|
||||
$oldcwd = getcwd();
|
||||
chdir(dirname(__FILE__));
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
set_include_path(dirname(__FILE__).'/bug39542;.');
|
||||
} else {
|
||||
set_include_path(dirname(__FILE__).'/bug39542:.');
|
||||
}
|
||||
|
||||
function __autoload($class) {
|
||||
if (!require_once($class.'.php')) {
|
||||
error_log('Error: Autoload class: '.$class.' not found!');
|
||||
}
|
||||
}
|
||||
|
||||
new bug39542();
|
||||
|
||||
chdir($oldcwd);
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,7 +0,0 @@
|
||||
<?php
|
||||
class bug39542 {
|
||||
function bug39542() {
|
||||
echo "ok\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -4,7 +4,6 @@ Bug #39602 (Invalid session.save_handler crashes PHP)
|
||||
<?php if (!extension_loaded("session")) die("skip"); ?>
|
||||
--INI--
|
||||
session.save_handler=qwerty
|
||||
error_reporting=0
|
||||
--FILE--
|
||||
<?php
|
||||
ini_set("session.save_handler","files");
|
||||
@@ -13,3 +12,4 @@ echo "ok";
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
Fatal error: Unknown: Cannot find save handler qwerty in Unknown on line 0
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
function func1() { }
|
||||
function func2() { }
|
||||
function func3() { }
|
||||
function func4() { }
|
||||
function func5() { }
|
||||
function func6() { }
|
||||
function func7() { }
|
||||
print ("ok\n");
|
||||
?>
|
||||
@@ -1,17 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40236 (php -a function allocation eats memory)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (php_sapi_name() != "cli") die("skip CLI only");
|
||||
if (extension_loaded("readline")) die("skip Test doesn't support readline");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
$cmd = "$php -d memory_limit=4M -a ".dirname(__FILE__)."/bug40236.inc";
|
||||
echo `$cmd`;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Interactive %s
|
||||
|
||||
ok
|
||||
@@ -1,25 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40261 (Extremely slow data handling due to memory fragmentation)
|
||||
--INI--
|
||||
memory_limit=128M
|
||||
--FILE--
|
||||
<?php
|
||||
$num = 100000;
|
||||
|
||||
$a = Array();
|
||||
for ($i=0; $i<$num; $i++) {
|
||||
$a[$i] = Array(1);
|
||||
}
|
||||
|
||||
for ($i=0; $i<$num; $i++) {
|
||||
$b[$i] = $a[$i][0];
|
||||
}
|
||||
|
||||
unset($a);
|
||||
for ($i=0; $i<$num; $i++) {
|
||||
$b[$i] = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
|
||||
}
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40509 key() function changed behaviour if global array is used within function
|
||||
--FILE--
|
||||
<?php
|
||||
function foo()
|
||||
{
|
||||
global $arr;
|
||||
|
||||
$c = $arr["v"];
|
||||
foreach ($c as $v) {}
|
||||
}
|
||||
|
||||
$arr["v"] = array("a");
|
||||
|
||||
var_dump(key($arr["v"]));
|
||||
foo();
|
||||
var_dump(key($arr["v"]));
|
||||
foreach ($arr["v"] as $k => $v) {
|
||||
var_dump($k);
|
||||
}
|
||||
var_dump(key($arr["v"]));
|
||||
--EXPECT--
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
NULL
|
||||
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40621 (Crash when constructor called inappropriately (statically))
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Foo {
|
||||
private function __construct() { }
|
||||
function get() {
|
||||
self::__construct();
|
||||
}
|
||||
}
|
||||
|
||||
Foo::get();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Non-static method Foo::get() should not be called statically in %s on line %d
|
||||
|
||||
Fatal error: Non-static method Foo::__construct() cannot be called statically in %s on line %d
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40705 Iterating within function moves original array pointer
|
||||
--FILE--
|
||||
<?php
|
||||
function doForeach($array)
|
||||
{
|
||||
foreach ($array as $k => $v) {
|
||||
// do stuff
|
||||
}
|
||||
}
|
||||
|
||||
$foo = array('foo', 'bar', 'baz');
|
||||
var_dump(key($foo));
|
||||
doForeach($foo);
|
||||
var_dump(key($foo));
|
||||
foreach ($foo as $k => $v) {
|
||||
var_dump($k);
|
||||
}
|
||||
var_dump(key($foo));
|
||||
--EXPECT--
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
int(1)
|
||||
int(2)
|
||||
NULL
|
||||
@@ -1,28 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40757 (get_object_vars() get nothing in child class)
|
||||
--FILE--
|
||||
<?php
|
||||
class Base {
|
||||
private $p1='sadf';
|
||||
|
||||
function getFields($obj){
|
||||
return get_object_vars($obj);
|
||||
}
|
||||
}
|
||||
|
||||
class Child extends Base { }
|
||||
|
||||
$base=new Base();
|
||||
print_r($base->getFields(new Base()));
|
||||
$child=new Child();
|
||||
print_r($child->getFields(new Base()));
|
||||
?>
|
||||
--EXPECT--
|
||||
Array
|
||||
(
|
||||
[p1] => sadf
|
||||
)
|
||||
Array
|
||||
(
|
||||
[p1] => sadf
|
||||
)
|
||||
@@ -1,22 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40770 (Apache child exits when PHP memory limit reached)
|
||||
--INI--
|
||||
memory_limit=8M
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
|
||||
if ($zend_mm_enabled === "0") {
|
||||
die("skip Zend MM disabled");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
ini_set('display_errors',true);
|
||||
$mb=148;
|
||||
$var = '';
|
||||
for ($i=0; $i<=$mb; $i++) {
|
||||
$var.= str_repeat('a',1*1024*1024);
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Allowed memory size of 8388608 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40784 (Case sensivity in constructor's fallback)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
function A () { echo "I'm A\n"; }
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
parent::__constrUct();
|
||||
}
|
||||
}
|
||||
|
||||
$b = new B;
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
I'm A
|
||||
I'm A
|
||||
Done
|
||||
@@ -1,33 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40809 (Poor perfomance of ".=")
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL|E_STRICT);
|
||||
|
||||
$num_increments = 100;
|
||||
$num_repeats = 1000;
|
||||
$increment = 50;
|
||||
|
||||
/* Create some more holes to give the memory allocator something to
|
||||
* work with. */
|
||||
$num = 5000;
|
||||
$a = Array();
|
||||
for ($i=0; $i<$num; $i++) {
|
||||
$a[$i] = Array(1);
|
||||
}
|
||||
for ($i=0; $i<$num; $i++) {
|
||||
$b[$i] = $a[$i][0];
|
||||
}
|
||||
unset($a);
|
||||
|
||||
for ($i=0;$i<$num_repeats;$i++) {
|
||||
$evil = "";
|
||||
for ($j=0;$j<$num_increments;$j++) {
|
||||
$evil .= str_repeat("a", $increment);
|
||||
}
|
||||
unset($evil);
|
||||
}
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40815 (using strings like "class::func" and static methods in set_exception_handler() might result in crash).
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class ehandle{
|
||||
static public function exh ($ex) {
|
||||
echo 'foo';
|
||||
}
|
||||
}
|
||||
|
||||
set_exception_handler("ehandle::exh");
|
||||
|
||||
throw new Exception ("Whiii");
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
foo
|
||||
@@ -1,72 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40833 (Crash when using unset() on an ArrayAccess object retrieved via __get)
|
||||
--FILE--
|
||||
<?php
|
||||
class entity
|
||||
{
|
||||
private $data;
|
||||
private $modified;
|
||||
|
||||
function __get($name)
|
||||
{
|
||||
if ( isset($this->data[$name]) )
|
||||
return $this->data[$name];
|
||||
else
|
||||
return $this->data[$name] = new set($this);
|
||||
}
|
||||
|
||||
function __set($name, $value)
|
||||
{
|
||||
$this->modified[$name] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
class set implements ArrayAccess
|
||||
{
|
||||
private $entity;
|
||||
|
||||
function __construct($entity)
|
||||
{
|
||||
$this->entity = $entity;
|
||||
$this->entity->whatever = $this;
|
||||
}
|
||||
|
||||
function clear() {
|
||||
$this->entity->whatever = null;
|
||||
}
|
||||
|
||||
function offsetUnset($offset)
|
||||
{
|
||||
$this->clear();
|
||||
// $this->entity->{$this->name} = null;
|
||||
}
|
||||
|
||||
function offsetSet($offset, $value)
|
||||
{
|
||||
}
|
||||
|
||||
function offsetGet($offset)
|
||||
{
|
||||
return 'Bogus ';
|
||||
}
|
||||
|
||||
function offsetExists($offset)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
$entity = new entity();
|
||||
echo($entity->whatever[0]);
|
||||
|
||||
//This will crash
|
||||
// $entity->whatever->clear();
|
||||
unset($entity->whatever[0]);
|
||||
|
||||
//This will not crash (comment previous & uncomment this to test
|
||||
// $test = $entity->whatever; unset($test[0]);
|
||||
|
||||
echo($entity->whatever[0]);
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Bogus Bogus ok
|
||||
@@ -1,9 +0,0 @@
|
||||
--TEST--
|
||||
Bug #40899 (memory leak when nesting list())
|
||||
--FILE--
|
||||
<?php
|
||||
list(list($a,$b),$c)=array(array('a','b'),'c');
|
||||
echo "$a$b$c\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
abc
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41026 (segfault when calling "self::method()" in shutdown functions)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class try_class
|
||||
{
|
||||
static public function main ()
|
||||
{
|
||||
register_shutdown_function (array ("self", "on_shutdown"));
|
||||
}
|
||||
|
||||
static public function on_shutdown ()
|
||||
{
|
||||
printf ("CHECKPOINT\n"); /* never reached */
|
||||
}
|
||||
}
|
||||
|
||||
try_class::main ();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Done
|
||||
|
||||
Warning: (Registered shutdown functions) Unable to call self::on_shutdown() - function does not exist in Unknown on line 0
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41075 (memleak when creating default object caused exception)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function err($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
throw new Exception($errstr);
|
||||
}
|
||||
|
||||
set_error_handler("err");
|
||||
|
||||
class test {
|
||||
function foo() {
|
||||
$var = $this->blah->prop = "string";
|
||||
var_dump($this->blah);
|
||||
}
|
||||
}
|
||||
|
||||
$t = new test;
|
||||
try {
|
||||
$t->foo();
|
||||
} catch (Exception $e) {
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(40) "Creating default object from empty value"
|
||||
Done
|
||||
@@ -1,14 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41117 (Altering $this via argument)
|
||||
--FILE--
|
||||
<?php
|
||||
class foo {
|
||||
function __construct($this) {
|
||||
echo $this."\n";
|
||||
}
|
||||
}
|
||||
$obj = new foo("Hello world");
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot re-assign $this in %sbug41117_1.php on line 3
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41209 (Segmentation fault with ArrayAccess, set_error_handler and undefined var)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class env
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
set_error_handler(array(__CLASS__, 'errorHandler'));
|
||||
}
|
||||
|
||||
public static function errorHandler($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
|
||||
}
|
||||
}
|
||||
|
||||
class cache implements ArrayAccess
|
||||
{
|
||||
private $container = array();
|
||||
|
||||
public function offsetGet($id) {}
|
||||
|
||||
public function offsetSet($id, $value) {}
|
||||
|
||||
public function offsetUnset($id) {}
|
||||
|
||||
public function offsetExists($id)
|
||||
{
|
||||
return isset($this->containers[(string) $id]);
|
||||
}
|
||||
}
|
||||
|
||||
$env = new env();
|
||||
$cache = new cache();
|
||||
var_dump(isset($cache[$id]));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught exception 'ErrorException' with message 'Undefined variable: id' in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): env::errorHandler()
|
||||
#1 {main}
|
||||
thrown in %s on line %d
|
||||
@@ -1,14 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41351 (Invalid opcode with foreach ($a[] as $b))
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = array();
|
||||
|
||||
foreach($a[] as $b) {
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use [] for reading in %s on line %d
|
||||
@@ -1,14 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41351 (Invalid opcode with foreach ($a[] as $b)) - 2
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = array();
|
||||
|
||||
foreach($a[]['test'] as $b) {
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use [] for reading in %s on line %d
|
||||
@@ -1,14 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41351 (Invalid opcode with foreach ($a[] as $b)) - 3
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = array();
|
||||
|
||||
foreach($a['test'][] as $b) {
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use [] for reading in %s on line %d
|
||||
@@ -1,13 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41372 Internal pointer of source array resets during array copying
|
||||
--FILE--
|
||||
<?php
|
||||
$Foo = array('val1', 'val2', 'val3');
|
||||
end($Foo);
|
||||
echo key($Foo),"\n";
|
||||
$MagicInternalPointerResetter = $Foo;
|
||||
echo key($Foo),"\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
2
|
||||
2
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41401 (wrong precedence for unary minus)
|
||||
--FILE--
|
||||
<?php
|
||||
echo 1/-2*5;
|
||||
echo "\n";
|
||||
echo 6/+2*-3;
|
||||
--EXPECT--
|
||||
-2.5
|
||||
-9
|
||||
@@ -1,29 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41421 (Uncaught exception from a stream wrapper segfaults)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class wrapper {
|
||||
function stream_open() {
|
||||
return true;
|
||||
}
|
||||
function stream_eof() {
|
||||
throw new exception();
|
||||
}
|
||||
}
|
||||
|
||||
stream_wrapper_register("wrap", "wrapper");
|
||||
$fp = fopen("wrap://...", "r");
|
||||
feof($fp);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: feof(): wrapper::stream_eof is not implemented! Assuming EOF in %s on line %d
|
||||
|
||||
Fatal error: Uncaught exception 'Exception' in %s:%d
|
||||
Stack trace:
|
||||
#0 [internal function]: wrapper->stream_eof()
|
||||
#1 %s(%d): feof(Resource id #6)
|
||||
#2 {main}
|
||||
thrown in %s on line %d
|
||||
@@ -1,12 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41633.1 (self:: doesn't work for constants)
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
const A = self::B;
|
||||
const B = "ok";
|
||||
}
|
||||
echo Foo::A."\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41633.2 (Undefined class constants must not be substituted by strings)
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
const A = self::B;
|
||||
}
|
||||
echo Foo::A."\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Undefined class constant 'self::B' in %sbug41633_2.php on line 5
|
||||
@@ -1,12 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41633.3 (Crash instantiating classes with self-referencing constants)
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
const A = Foo::B;
|
||||
const B = Foo::A;
|
||||
}
|
||||
echo Foo::A;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot declare self-referencing constant 'Foo::B' in %sbug41633_3.php on line %d
|
||||
@@ -1,12 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41633.4 (self:: doesn't work for constants)
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
const A = self::B;
|
||||
const B = "ok";
|
||||
}
|
||||
var_dump(defined("Foo::A"));
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
@@ -1,15 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41640 (get_class_vars produces error on class constants)
|
||||
--FILE--
|
||||
<?php
|
||||
class foo {
|
||||
const FOO = 1;
|
||||
public $x = self::FOO;
|
||||
}
|
||||
|
||||
var_dump(get_class_vars("foo"));
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
["x"]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41813 (segmentation fault when using string offset as an object)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$foo = "50";
|
||||
$foo[0]->bar = "xyz";
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use string offset as an array in %s on line %d
|
||||
@@ -1,12 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41919 (crash in string to array conversion)
|
||||
--FILE--
|
||||
<?php
|
||||
$foo="50";
|
||||
$foo[3]->bar[1] = "bang";
|
||||
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Cannot use string offset as an array in %s/bug41919.php on line %d
|
||||
ok
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41929 Foreach on object does not iterate over all visible properties
|
||||
--FILE--
|
||||
<?php
|
||||
class C {
|
||||
private $priv = "ok";
|
||||
|
||||
function doLoop() {
|
||||
echo $this->priv,"\n";
|
||||
foreach ($this as $k=>$v) {
|
||||
echo "$k: $v\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class D extends C {
|
||||
}
|
||||
|
||||
$myD = new D;
|
||||
$myD->doLoop();
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
priv: ok
|
||||
@@ -1,29 +0,0 @@
|
||||
--TEST--
|
||||
Bug #41961 (Ensure search for hidden private methods does not stray from class hierarchy)
|
||||
--FILE--
|
||||
<?php
|
||||
X::test();
|
||||
|
||||
/** Class X is related to neither ParentClass nor ChildClass. */
|
||||
class X {
|
||||
public static function test() {
|
||||
$myChild = new ChildClass;
|
||||
$myChild->secret(); // bug - invokes X::secret() instead of ChildClass::secret()
|
||||
}
|
||||
private function secret() {
|
||||
echo "Called private " . __METHOD__ . "() on an instance of: " . get_class($this) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
class ParentClass {
|
||||
private function secret() { }
|
||||
}
|
||||
|
||||
class ChildClass extends ParentClass {
|
||||
public function secret() {
|
||||
echo "Called public " . __METHOD__ . "() on an instance of: " . get_class($this) . "\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Called public ChildClass::secret() on an instance of: ChildClass
|
||||
@@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
Bug #42119 (array_push($arr,&$obj) doesn't work with zend.ze1_compatibility_mode On)
|
||||
--INI--
|
||||
allow_call_time_pass_reference=1
|
||||
zend.ze1_compatibility_mode=1
|
||||
--FILE--
|
||||
<?php
|
||||
class myclass {
|
||||
var $item = 1;
|
||||
}
|
||||
|
||||
$arr = array();
|
||||
@$myobj = new myclass();
|
||||
array_push($arr,&$myobj);
|
||||
$myobj->item = 2;
|
||||
echo $arr[0]->item,"\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
2
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Bug #42211 (property_exists() fails to find protected properties from a parent class)
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
function foo() {
|
||||
var_dump(property_exists('B', 'publicBar'));
|
||||
var_dump(property_exists('B', 'protectedBar'));
|
||||
var_dump(property_exists('B', 'privateBar'));
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
static public $publicBar = "ok";
|
||||
static protected $protectedBar = "ok";
|
||||
static private $privateBar = "fail";
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
$a->foo();
|
||||
$b = new B();
|
||||
$b->foo();
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
|
||||
Binary file not shown.
@@ -1,53 +0,0 @@
|
||||
--TEST--
|
||||
casting different variables to boolean
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$r = fopen(__FILE__, "r");
|
||||
|
||||
class test {
|
||||
function __toString() {
|
||||
return "10";
|
||||
}
|
||||
}
|
||||
|
||||
$o = new test;
|
||||
|
||||
$vars = array(
|
||||
"string",
|
||||
"8754456",
|
||||
"",
|
||||
"\0",
|
||||
9876545,
|
||||
0.10,
|
||||
array(),
|
||||
array(1,2,3),
|
||||
false,
|
||||
true,
|
||||
NULL,
|
||||
$r,
|
||||
$o
|
||||
);
|
||||
|
||||
foreach ($vars as $var) {
|
||||
$tmp = (bool)$var;
|
||||
var_dump($tmp);
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
Done
|
||||
@@ -1,57 +0,0 @@
|
||||
--TEST--
|
||||
casting different variables to double
|
||||
--INI--
|
||||
precision=14
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$r = fopen(__FILE__, "r");
|
||||
|
||||
class test {
|
||||
function __toString() {
|
||||
return "10";
|
||||
}
|
||||
}
|
||||
|
||||
$o = new test;
|
||||
|
||||
$vars = array(
|
||||
"string",
|
||||
"8754456",
|
||||
"",
|
||||
"\0",
|
||||
9876545,
|
||||
0.10,
|
||||
array(),
|
||||
array(1,2,3),
|
||||
false,
|
||||
true,
|
||||
NULL,
|
||||
$r,
|
||||
$o
|
||||
);
|
||||
|
||||
foreach ($vars as $var) {
|
||||
$tmp = (double)$var;
|
||||
var_dump($tmp);
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
float(0)
|
||||
float(8754456)
|
||||
float(0)
|
||||
float(0)
|
||||
float(9876545)
|
||||
float(0.1)
|
||||
float(0)
|
||||
float(1)
|
||||
float(0)
|
||||
float(1)
|
||||
float(0)
|
||||
float(%d)
|
||||
|
||||
Notice: Object of class test could not be converted to double in %s on line %d
|
||||
float(1)
|
||||
Done
|
||||
@@ -1,55 +0,0 @@
|
||||
--TEST--
|
||||
casting different variables to integer
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$r = fopen(__FILE__, "r");
|
||||
|
||||
class test {
|
||||
function __toString() {
|
||||
return "10";
|
||||
}
|
||||
}
|
||||
|
||||
$o = new test;
|
||||
|
||||
$vars = array(
|
||||
"string",
|
||||
"8754456",
|
||||
"",
|
||||
"\0",
|
||||
9876545,
|
||||
0.10,
|
||||
array(),
|
||||
array(1,2,3),
|
||||
false,
|
||||
true,
|
||||
NULL,
|
||||
$r,
|
||||
$o
|
||||
);
|
||||
|
||||
foreach ($vars as $var) {
|
||||
$tmp = (int)$var;
|
||||
var_dump($tmp);
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(0)
|
||||
int(8754456)
|
||||
int(0)
|
||||
int(0)
|
||||
int(9876545)
|
||||
int(0)
|
||||
int(0)
|
||||
int(1)
|
||||
int(0)
|
||||
int(1)
|
||||
int(0)
|
||||
int(%d)
|
||||
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
int(1)
|
||||
Done
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,22 +0,0 @@
|
||||
--TEST--
|
||||
class constants basic tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
const val = "string";
|
||||
const val2 = 1;
|
||||
}
|
||||
|
||||
var_dump(test::val);
|
||||
var_dump(test::val2);
|
||||
|
||||
var_dump(test::val3);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(6) "string"
|
||||
int(1)
|
||||
|
||||
Fatal error: Undefined class constant 'val3' in %s on line %d
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
class constants as default function arguments
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
const val = 1;
|
||||
}
|
||||
|
||||
function foo($v = test::val) {
|
||||
var_dump($v);
|
||||
}
|
||||
|
||||
function bar($b = NoSuchClass::val) {
|
||||
var_dump($b);
|
||||
}
|
||||
|
||||
foo();
|
||||
foo(5);
|
||||
|
||||
bar(10);
|
||||
bar();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(1)
|
||||
int(5)
|
||||
int(10)
|
||||
|
||||
Fatal error: Class 'NoSuchClass' not found in %s on line %d
|
||||
@@ -1,33 +0,0 @@
|
||||
--TEST--
|
||||
class constants as default function arguments and dynamically loaded classes
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$class_data = <<<DATA
|
||||
<?php
|
||||
class test {
|
||||
const val = 1;
|
||||
}
|
||||
?>
|
||||
DATA;
|
||||
|
||||
$filename = dirname(__FILE__)."/cc003.dat";
|
||||
file_put_contents($filename, $class_data);
|
||||
|
||||
function foo($v = test::val) {
|
||||
var_dump($v);
|
||||
}
|
||||
|
||||
include $filename;
|
||||
|
||||
foo();
|
||||
foo(5);
|
||||
|
||||
unlink($filename);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(1)
|
||||
int(5)
|
||||
Done
|
||||
@@ -1,389 +0,0 @@
|
||||
--TEST--
|
||||
comparing different variables for equality
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
}
|
||||
|
||||
$a = array(
|
||||
array(1,2,3),
|
||||
"",
|
||||
1,
|
||||
2.5,
|
||||
0,
|
||||
"string",
|
||||
"123",
|
||||
"2.5",
|
||||
NULL,
|
||||
true,
|
||||
false,
|
||||
new stdclass,
|
||||
new stdclass,
|
||||
new test,
|
||||
array(),
|
||||
-PHP_INT_MAX-1,
|
||||
(string)(-PHP_INT_MAX-1),
|
||||
);
|
||||
|
||||
$var_cnt = count($a);
|
||||
|
||||
function my_dump($var) {
|
||||
ob_start();
|
||||
var_dump($var);
|
||||
$buf = ob_get_clean();
|
||||
echo str_replace("\n", "", $buf);
|
||||
}
|
||||
|
||||
foreach($a as $var) {
|
||||
for ($i = 0; $i < $var_cnt; $i++) {
|
||||
my_dump($var);
|
||||
echo ($var == $a[$i]) ? " == " : " != ";
|
||||
my_dump($a[$i]);
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} == array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != string(0) ""
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != int(1)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != float(2.5)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != int(0)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != string(6) "string"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != string(3) "123"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != string(3) "2.5"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != NULL
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} == bool(true)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != bool(false)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != object(stdClass)#1 (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != object(stdClass)#2 (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != object(test)#3 (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != array(0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != int(-2147483648)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != string(11) "-2147483648"
|
||||
string(0) "" != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(0) "" == string(0) ""
|
||||
string(0) "" != int(1)
|
||||
string(0) "" != float(2.5)
|
||||
string(0) "" == int(0)
|
||||
string(0) "" != string(6) "string"
|
||||
string(0) "" != string(3) "123"
|
||||
string(0) "" != string(3) "2.5"
|
||||
string(0) "" == NULL
|
||||
string(0) "" != bool(true)
|
||||
string(0) "" == bool(false)
|
||||
string(0) "" != object(stdClass)#1 (0) {}
|
||||
string(0) "" != object(stdClass)#2 (0) {}
|
||||
string(0) "" != object(test)#3 (0) {}
|
||||
string(0) "" != array(0) {}
|
||||
string(0) "" != int(-2147483648)
|
||||
string(0) "" != string(11) "-2147483648"
|
||||
int(1) != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(1) != string(0) ""
|
||||
int(1) == int(1)
|
||||
int(1) != float(2.5)
|
||||
int(1) != int(0)
|
||||
int(1) != string(6) "string"
|
||||
int(1) != string(3) "123"
|
||||
int(1) != string(3) "2.5"
|
||||
int(1) != NULL
|
||||
int(1) == bool(true)
|
||||
int(1) != bool(false)
|
||||
int(1)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
== object(stdClass)#1 (0) {}
|
||||
int(1)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
== object(stdClass)#2 (0) {}
|
||||
int(1)
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
== object(test)#3 (0) {}
|
||||
int(1) != array(0) {}
|
||||
int(1) != int(-2147483648)
|
||||
int(1) != string(11) "-2147483648"
|
||||
float(2.5) != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
float(2.5) != string(0) ""
|
||||
float(2.5) != int(1)
|
||||
float(2.5) == float(2.5)
|
||||
float(2.5) != int(0)
|
||||
float(2.5) != string(6) "string"
|
||||
float(2.5) != string(3) "123"
|
||||
float(2.5) == string(3) "2.5"
|
||||
float(2.5) != NULL
|
||||
float(2.5) == bool(true)
|
||||
float(2.5) != bool(false)
|
||||
float(2.5)
|
||||
Notice: Object of class stdClass could not be converted to double in %s on line %d
|
||||
!= object(stdClass)#1 (0) {}
|
||||
float(2.5)
|
||||
Notice: Object of class stdClass could not be converted to double in %s on line %d
|
||||
!= object(stdClass)#2 (0) {}
|
||||
float(2.5)
|
||||
Notice: Object of class test could not be converted to double in %s on line %d
|
||||
!= object(test)#3 (0) {}
|
||||
float(2.5) != array(0) {}
|
||||
float(2.5) != int(-2147483648)
|
||||
float(2.5) != string(11) "-2147483648"
|
||||
int(0) != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(0) == string(0) ""
|
||||
int(0) != int(1)
|
||||
int(0) != float(2.5)
|
||||
int(0) == int(0)
|
||||
int(0) == string(6) "string"
|
||||
int(0) != string(3) "123"
|
||||
int(0) != string(3) "2.5"
|
||||
int(0) == NULL
|
||||
int(0) != bool(true)
|
||||
int(0) == bool(false)
|
||||
int(0)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= object(stdClass)#1 (0) {}
|
||||
int(0)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= object(stdClass)#2 (0) {}
|
||||
int(0)
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
!= object(test)#3 (0) {}
|
||||
int(0) != array(0) {}
|
||||
int(0) != int(-2147483648)
|
||||
int(0) != string(11) "-2147483648"
|
||||
string(6) "string" != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(6) "string" != string(0) ""
|
||||
string(6) "string" != int(1)
|
||||
string(6) "string" != float(2.5)
|
||||
string(6) "string" == int(0)
|
||||
string(6) "string" == string(6) "string"
|
||||
string(6) "string" != string(3) "123"
|
||||
string(6) "string" != string(3) "2.5"
|
||||
string(6) "string" != NULL
|
||||
string(6) "string" == bool(true)
|
||||
string(6) "string" != bool(false)
|
||||
string(6) "string" != object(stdClass)#1 (0) {}
|
||||
string(6) "string" != object(stdClass)#2 (0) {}
|
||||
string(6) "string" != object(test)#3 (0) {}
|
||||
string(6) "string" != array(0) {}
|
||||
string(6) "string" != int(-2147483648)
|
||||
string(6) "string" != string(11) "-2147483648"
|
||||
string(3) "123" != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(3) "123" != string(0) ""
|
||||
string(3) "123" != int(1)
|
||||
string(3) "123" != float(2.5)
|
||||
string(3) "123" != int(0)
|
||||
string(3) "123" != string(6) "string"
|
||||
string(3) "123" == string(3) "123"
|
||||
string(3) "123" != string(3) "2.5"
|
||||
string(3) "123" != NULL
|
||||
string(3) "123" == bool(true)
|
||||
string(3) "123" != bool(false)
|
||||
string(3) "123" != object(stdClass)#1 (0) {}
|
||||
string(3) "123" != object(stdClass)#2 (0) {}
|
||||
string(3) "123" != object(test)#3 (0) {}
|
||||
string(3) "123" != array(0) {}
|
||||
string(3) "123" != int(-2147483648)
|
||||
string(3) "123" != string(11) "-2147483648"
|
||||
string(3) "2.5" != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(3) "2.5" != string(0) ""
|
||||
string(3) "2.5" != int(1)
|
||||
string(3) "2.5" == float(2.5)
|
||||
string(3) "2.5" != int(0)
|
||||
string(3) "2.5" != string(6) "string"
|
||||
string(3) "2.5" != string(3) "123"
|
||||
string(3) "2.5" == string(3) "2.5"
|
||||
string(3) "2.5" != NULL
|
||||
string(3) "2.5" == bool(true)
|
||||
string(3) "2.5" != bool(false)
|
||||
string(3) "2.5" != object(stdClass)#1 (0) {}
|
||||
string(3) "2.5" != object(stdClass)#2 (0) {}
|
||||
string(3) "2.5" != object(test)#3 (0) {}
|
||||
string(3) "2.5" != array(0) {}
|
||||
string(3) "2.5" != int(-2147483648)
|
||||
string(3) "2.5" != string(11) "-2147483648"
|
||||
NULL != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
NULL == string(0) ""
|
||||
NULL != int(1)
|
||||
NULL != float(2.5)
|
||||
NULL == int(0)
|
||||
NULL != string(6) "string"
|
||||
NULL != string(3) "123"
|
||||
NULL != string(3) "2.5"
|
||||
NULL == NULL
|
||||
NULL != bool(true)
|
||||
NULL == bool(false)
|
||||
NULL != object(stdClass)#1 (0) {}
|
||||
NULL != object(stdClass)#2 (0) {}
|
||||
NULL != object(test)#3 (0) {}
|
||||
NULL == array(0) {}
|
||||
NULL != int(-2147483648)
|
||||
NULL != string(11) "-2147483648"
|
||||
bool(true) == array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
bool(true) != string(0) ""
|
||||
bool(true) == int(1)
|
||||
bool(true) == float(2.5)
|
||||
bool(true) != int(0)
|
||||
bool(true) == string(6) "string"
|
||||
bool(true) == string(3) "123"
|
||||
bool(true) == string(3) "2.5"
|
||||
bool(true) != NULL
|
||||
bool(true) == bool(true)
|
||||
bool(true) != bool(false)
|
||||
bool(true) == object(stdClass)#1 (0) {}
|
||||
bool(true) == object(stdClass)#2 (0) {}
|
||||
bool(true) == object(test)#3 (0) {}
|
||||
bool(true) != array(0) {}
|
||||
bool(true) == int(-2147483648)
|
||||
bool(true) == string(11) "-2147483648"
|
||||
bool(false) != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
bool(false) == string(0) ""
|
||||
bool(false) != int(1)
|
||||
bool(false) != float(2.5)
|
||||
bool(false) == int(0)
|
||||
bool(false) != string(6) "string"
|
||||
bool(false) != string(3) "123"
|
||||
bool(false) != string(3) "2.5"
|
||||
bool(false) == NULL
|
||||
bool(false) != bool(true)
|
||||
bool(false) == bool(false)
|
||||
bool(false) != object(stdClass)#1 (0) {}
|
||||
bool(false) != object(stdClass)#2 (0) {}
|
||||
bool(false) != object(test)#3 (0) {}
|
||||
bool(false) == array(0) {}
|
||||
bool(false) != int(-2147483648)
|
||||
bool(false) != string(11) "-2147483648"
|
||||
object(stdClass)#1 (0) {} != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(stdClass)#1 (0) {} != string(0) ""
|
||||
object(stdClass)#1 (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
== int(1)
|
||||
object(stdClass)#1 (0) {}
|
||||
Notice: Object of class stdClass could not be converted to double in %s on line %d
|
||||
!= float(2.5)
|
||||
object(stdClass)#1 (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= int(0)
|
||||
object(stdClass)#1 (0) {} != string(6) "string"
|
||||
object(stdClass)#1 (0) {} != string(3) "123"
|
||||
object(stdClass)#1 (0) {} != string(3) "2.5"
|
||||
object(stdClass)#1 (0) {} != NULL
|
||||
object(stdClass)#1 (0) {} == bool(true)
|
||||
object(stdClass)#1 (0) {} != bool(false)
|
||||
object(stdClass)#1 (0) {} == object(stdClass)#1 (0) {}
|
||||
object(stdClass)#1 (0) {} == object(stdClass)#2 (0) {}
|
||||
object(stdClass)#1 (0) {} != object(test)#3 (0) {}
|
||||
object(stdClass)#1 (0) {} != array(0) {}
|
||||
object(stdClass)#1 (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= int(-2147483648)
|
||||
object(stdClass)#1 (0) {} != string(11) "-2147483648"
|
||||
object(stdClass)#2 (0) {} != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(stdClass)#2 (0) {} != string(0) ""
|
||||
object(stdClass)#2 (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
== int(1)
|
||||
object(stdClass)#2 (0) {}
|
||||
Notice: Object of class stdClass could not be converted to double in %s on line %d
|
||||
!= float(2.5)
|
||||
object(stdClass)#2 (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= int(0)
|
||||
object(stdClass)#2 (0) {} != string(6) "string"
|
||||
object(stdClass)#2 (0) {} != string(3) "123"
|
||||
object(stdClass)#2 (0) {} != string(3) "2.5"
|
||||
object(stdClass)#2 (0) {} != NULL
|
||||
object(stdClass)#2 (0) {} == bool(true)
|
||||
object(stdClass)#2 (0) {} != bool(false)
|
||||
object(stdClass)#2 (0) {} == object(stdClass)#1 (0) {}
|
||||
object(stdClass)#2 (0) {} == object(stdClass)#2 (0) {}
|
||||
object(stdClass)#2 (0) {} != object(test)#3 (0) {}
|
||||
object(stdClass)#2 (0) {} != array(0) {}
|
||||
object(stdClass)#2 (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= int(-2147483648)
|
||||
object(stdClass)#2 (0) {} != string(11) "-2147483648"
|
||||
object(test)#3 (0) {} != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(test)#3 (0) {} != string(0) ""
|
||||
object(test)#3 (0) {}
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
== int(1)
|
||||
object(test)#3 (0) {}
|
||||
Notice: Object of class test could not be converted to double in %s on line %d
|
||||
!= float(2.5)
|
||||
object(test)#3 (0) {}
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
!= int(0)
|
||||
object(test)#3 (0) {} != string(6) "string"
|
||||
object(test)#3 (0) {} != string(3) "123"
|
||||
object(test)#3 (0) {} != string(3) "2.5"
|
||||
object(test)#3 (0) {} != NULL
|
||||
object(test)#3 (0) {} == bool(true)
|
||||
object(test)#3 (0) {} != bool(false)
|
||||
object(test)#3 (0) {} != object(stdClass)#1 (0) {}
|
||||
object(test)#3 (0) {} != object(stdClass)#2 (0) {}
|
||||
object(test)#3 (0) {} == object(test)#3 (0) {}
|
||||
object(test)#3 (0) {} != array(0) {}
|
||||
object(test)#3 (0) {}
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
!= int(-2147483648)
|
||||
object(test)#3 (0) {} != string(11) "-2147483648"
|
||||
array(0) {} != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
array(0) {} != string(0) ""
|
||||
array(0) {} != int(1)
|
||||
array(0) {} != float(2.5)
|
||||
array(0) {} != int(0)
|
||||
array(0) {} != string(6) "string"
|
||||
array(0) {} != string(3) "123"
|
||||
array(0) {} != string(3) "2.5"
|
||||
array(0) {} == NULL
|
||||
array(0) {} != bool(true)
|
||||
array(0) {} == bool(false)
|
||||
array(0) {} != object(stdClass)#1 (0) {}
|
||||
array(0) {} != object(stdClass)#2 (0) {}
|
||||
array(0) {} != object(test)#3 (0) {}
|
||||
array(0) {} == array(0) {}
|
||||
array(0) {} != int(-2147483648)
|
||||
array(0) {} != string(11) "-2147483648"
|
||||
int(-2147483648) != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(-2147483648) != string(0) ""
|
||||
int(-2147483648) != int(1)
|
||||
int(-2147483648) != float(2.5)
|
||||
int(-2147483648) != int(0)
|
||||
int(-2147483648) != string(6) "string"
|
||||
int(-2147483648) != string(3) "123"
|
||||
int(-2147483648) != string(3) "2.5"
|
||||
int(-2147483648) != NULL
|
||||
int(-2147483648) == bool(true)
|
||||
int(-2147483648) != bool(false)
|
||||
int(-2147483648)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= object(stdClass)#1 (0) {}
|
||||
int(-2147483648)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= object(stdClass)#2 (0) {}
|
||||
int(-2147483648)
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
!= object(test)#3 (0) {}
|
||||
int(-2147483648) != array(0) {}
|
||||
int(-2147483648) == int(-2147483648)
|
||||
int(-2147483648) == string(11) "-2147483648"
|
||||
string(11) "-2147483648" != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(11) "-2147483648" != string(0) ""
|
||||
string(11) "-2147483648" != int(1)
|
||||
string(11) "-2147483648" != float(2.5)
|
||||
string(11) "-2147483648" != int(0)
|
||||
string(11) "-2147483648" != string(6) "string"
|
||||
string(11) "-2147483648" != string(3) "123"
|
||||
string(11) "-2147483648" != string(3) "2.5"
|
||||
string(11) "-2147483648" != NULL
|
||||
string(11) "-2147483648" == bool(true)
|
||||
string(11) "-2147483648" != bool(false)
|
||||
string(11) "-2147483648" != object(stdClass)#1 (0) {}
|
||||
string(11) "-2147483648" != object(stdClass)#2 (0) {}
|
||||
string(11) "-2147483648" != object(test)#3 (0) {}
|
||||
string(11) "-2147483648" != array(0) {}
|
||||
string(11) "-2147483648" == int(-2147483648)
|
||||
string(11) "-2147483648" == string(11) "-2147483648"
|
||||
Done
|
||||
@@ -1,389 +0,0 @@
|
||||
--TEST--
|
||||
comparing different variables for equality
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
}
|
||||
|
||||
$a = array(
|
||||
array(1,2,3),
|
||||
"",
|
||||
1,
|
||||
2.5,
|
||||
0,
|
||||
"string",
|
||||
"123",
|
||||
"2.5",
|
||||
NULL,
|
||||
true,
|
||||
false,
|
||||
new stdclass,
|
||||
new stdclass,
|
||||
new test,
|
||||
array(),
|
||||
-PHP_INT_MAX-1,
|
||||
(string)(-PHP_INT_MAX-1),
|
||||
);
|
||||
|
||||
$var_cnt = count($a);
|
||||
|
||||
function my_dump($var) {
|
||||
ob_start();
|
||||
var_dump($var);
|
||||
$buf = ob_get_clean();
|
||||
echo str_replace("\n", "", $buf);
|
||||
}
|
||||
|
||||
foreach($a as $var) {
|
||||
for ($i = 0; $i < $var_cnt; $i++) {
|
||||
my_dump($var);
|
||||
echo ($var == $a[$i]) ? " == " : " != ";
|
||||
my_dump($a[$i]);
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} == array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != string(0) ""
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != int(1)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != float(2.5)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != int(0)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != string(6) "string"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != string(3) "123"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != string(3) "2.5"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != NULL
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} == bool(true)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != bool(false)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != object(stdClass)#%d (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != object(stdClass)#%d (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != object(test)#%d (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != array(0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != int(-9223372036854775808)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} != string(20) "-9223372036854775808"
|
||||
string(0) "" != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(0) "" == string(0) ""
|
||||
string(0) "" != int(1)
|
||||
string(0) "" != float(2.5)
|
||||
string(0) "" == int(0)
|
||||
string(0) "" != string(6) "string"
|
||||
string(0) "" != string(3) "123"
|
||||
string(0) "" != string(3) "2.5"
|
||||
string(0) "" == NULL
|
||||
string(0) "" != bool(true)
|
||||
string(0) "" == bool(false)
|
||||
string(0) "" != object(stdClass)#%d (0) {}
|
||||
string(0) "" != object(stdClass)#%d (0) {}
|
||||
string(0) "" != object(test)#%d (0) {}
|
||||
string(0) "" != array(0) {}
|
||||
string(0) "" != int(-9223372036854775808)
|
||||
string(0) "" != string(20) "-9223372036854775808"
|
||||
int(1) != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(1) != string(0) ""
|
||||
int(1) == int(1)
|
||||
int(1) != float(2.5)
|
||||
int(1) != int(0)
|
||||
int(1) != string(6) "string"
|
||||
int(1) != string(3) "123"
|
||||
int(1) != string(3) "2.5"
|
||||
int(1) != NULL
|
||||
int(1) == bool(true)
|
||||
int(1) != bool(false)
|
||||
int(1)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
== object(stdClass)#%d (0) {}
|
||||
int(1)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
== object(stdClass)#%d (0) {}
|
||||
int(1)
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
== object(test)#%d (0) {}
|
||||
int(1) != array(0) {}
|
||||
int(1) != int(-9223372036854775808)
|
||||
int(1) != string(20) "-9223372036854775808"
|
||||
float(2.5) != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
float(2.5) != string(0) ""
|
||||
float(2.5) != int(1)
|
||||
float(2.5) == float(2.5)
|
||||
float(2.5) != int(0)
|
||||
float(2.5) != string(6) "string"
|
||||
float(2.5) != string(3) "123"
|
||||
float(2.5) == string(3) "2.5"
|
||||
float(2.5) != NULL
|
||||
float(2.5) == bool(true)
|
||||
float(2.5) != bool(false)
|
||||
float(2.5)
|
||||
Notice: Object of class stdClass could not be converted to double in %s on line %d
|
||||
!= object(stdClass)#%d (0) {}
|
||||
float(2.5)
|
||||
Notice: Object of class stdClass could not be converted to double in %s on line %d
|
||||
!= object(stdClass)#%d (0) {}
|
||||
float(2.5)
|
||||
Notice: Object of class test could not be converted to double in %s on line %d
|
||||
!= object(test)#%d (0) {}
|
||||
float(2.5) != array(0) {}
|
||||
float(2.5) != int(-9223372036854775808)
|
||||
float(2.5) != string(20) "-9223372036854775808"
|
||||
int(0) != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(0) == string(0) ""
|
||||
int(0) != int(1)
|
||||
int(0) != float(2.5)
|
||||
int(0) == int(0)
|
||||
int(0) == string(6) "string"
|
||||
int(0) != string(3) "123"
|
||||
int(0) != string(3) "2.5"
|
||||
int(0) == NULL
|
||||
int(0) != bool(true)
|
||||
int(0) == bool(false)
|
||||
int(0)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= object(stdClass)#%d (0) {}
|
||||
int(0)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= object(stdClass)#%d (0) {}
|
||||
int(0)
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
!= object(test)#%d (0) {}
|
||||
int(0) != array(0) {}
|
||||
int(0) != int(-9223372036854775808)
|
||||
int(0) != string(20) "-9223372036854775808"
|
||||
string(6) "string" != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(6) "string" != string(0) ""
|
||||
string(6) "string" != int(1)
|
||||
string(6) "string" != float(2.5)
|
||||
string(6) "string" == int(0)
|
||||
string(6) "string" == string(6) "string"
|
||||
string(6) "string" != string(3) "123"
|
||||
string(6) "string" != string(3) "2.5"
|
||||
string(6) "string" != NULL
|
||||
string(6) "string" == bool(true)
|
||||
string(6) "string" != bool(false)
|
||||
string(6) "string" != object(stdClass)#%d (0) {}
|
||||
string(6) "string" != object(stdClass)#%d (0) {}
|
||||
string(6) "string" != object(test)#%d (0) {}
|
||||
string(6) "string" != array(0) {}
|
||||
string(6) "string" != int(-9223372036854775808)
|
||||
string(6) "string" != string(20) "-9223372036854775808"
|
||||
string(3) "123" != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(3) "123" != string(0) ""
|
||||
string(3) "123" != int(1)
|
||||
string(3) "123" != float(2.5)
|
||||
string(3) "123" != int(0)
|
||||
string(3) "123" != string(6) "string"
|
||||
string(3) "123" == string(3) "123"
|
||||
string(3) "123" != string(3) "2.5"
|
||||
string(3) "123" != NULL
|
||||
string(3) "123" == bool(true)
|
||||
string(3) "123" != bool(false)
|
||||
string(3) "123" != object(stdClass)#%d (0) {}
|
||||
string(3) "123" != object(stdClass)#%d (0) {}
|
||||
string(3) "123" != object(test)#%d (0) {}
|
||||
string(3) "123" != array(0) {}
|
||||
string(3) "123" != int(-9223372036854775808)
|
||||
string(3) "123" != string(20) "-9223372036854775808"
|
||||
string(3) "2.5" != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(3) "2.5" != string(0) ""
|
||||
string(3) "2.5" != int(1)
|
||||
string(3) "2.5" == float(2.5)
|
||||
string(3) "2.5" != int(0)
|
||||
string(3) "2.5" != string(6) "string"
|
||||
string(3) "2.5" != string(3) "123"
|
||||
string(3) "2.5" == string(3) "2.5"
|
||||
string(3) "2.5" != NULL
|
||||
string(3) "2.5" == bool(true)
|
||||
string(3) "2.5" != bool(false)
|
||||
string(3) "2.5" != object(stdClass)#%d (0) {}
|
||||
string(3) "2.5" != object(stdClass)#%d (0) {}
|
||||
string(3) "2.5" != object(test)#%d (0) {}
|
||||
string(3) "2.5" != array(0) {}
|
||||
string(3) "2.5" != int(-9223372036854775808)
|
||||
string(3) "2.5" != string(20) "-9223372036854775808"
|
||||
NULL != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
NULL == string(0) ""
|
||||
NULL != int(1)
|
||||
NULL != float(2.5)
|
||||
NULL == int(0)
|
||||
NULL != string(6) "string"
|
||||
NULL != string(3) "123"
|
||||
NULL != string(3) "2.5"
|
||||
NULL == NULL
|
||||
NULL != bool(true)
|
||||
NULL == bool(false)
|
||||
NULL != object(stdClass)#%d (0) {}
|
||||
NULL != object(stdClass)#%d (0) {}
|
||||
NULL != object(test)#%d (0) {}
|
||||
NULL == array(0) {}
|
||||
NULL != int(-9223372036854775808)
|
||||
NULL != string(20) "-9223372036854775808"
|
||||
bool(true) == array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
bool(true) != string(0) ""
|
||||
bool(true) == int(1)
|
||||
bool(true) == float(2.5)
|
||||
bool(true) != int(0)
|
||||
bool(true) == string(6) "string"
|
||||
bool(true) == string(3) "123"
|
||||
bool(true) == string(3) "2.5"
|
||||
bool(true) != NULL
|
||||
bool(true) == bool(true)
|
||||
bool(true) != bool(false)
|
||||
bool(true) == object(stdClass)#%d (0) {}
|
||||
bool(true) == object(stdClass)#%d (0) {}
|
||||
bool(true) == object(test)#%d (0) {}
|
||||
bool(true) != array(0) {}
|
||||
bool(true) == int(-9223372036854775808)
|
||||
bool(true) == string(20) "-9223372036854775808"
|
||||
bool(false) != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
bool(false) == string(0) ""
|
||||
bool(false) != int(1)
|
||||
bool(false) != float(2.5)
|
||||
bool(false) == int(0)
|
||||
bool(false) != string(6) "string"
|
||||
bool(false) != string(3) "123"
|
||||
bool(false) != string(3) "2.5"
|
||||
bool(false) == NULL
|
||||
bool(false) != bool(true)
|
||||
bool(false) == bool(false)
|
||||
bool(false) != object(stdClass)#%d (0) {}
|
||||
bool(false) != object(stdClass)#%d (0) {}
|
||||
bool(false) != object(test)#%d (0) {}
|
||||
bool(false) == array(0) {}
|
||||
bool(false) != int(-9223372036854775808)
|
||||
bool(false) != string(20) "-9223372036854775808"
|
||||
object(stdClass)#%d (0) {} != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(stdClass)#%d (0) {} != string(0) ""
|
||||
object(stdClass)#%d (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
== int(1)
|
||||
object(stdClass)#%d (0) {}
|
||||
Notice: Object of class stdClass could not be converted to double in %s on line %d
|
||||
!= float(2.5)
|
||||
object(stdClass)#%d (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= int(0)
|
||||
object(stdClass)#%d (0) {} != string(6) "string"
|
||||
object(stdClass)#%d (0) {} != string(3) "123"
|
||||
object(stdClass)#%d (0) {} != string(3) "2.5"
|
||||
object(stdClass)#%d (0) {} != NULL
|
||||
object(stdClass)#%d (0) {} == bool(true)
|
||||
object(stdClass)#%d (0) {} != bool(false)
|
||||
object(stdClass)#%d (0) {} == object(stdClass)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} == object(stdClass)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} != object(test)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} != array(0) {}
|
||||
object(stdClass)#%d (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= int(-9223372036854775808)
|
||||
object(stdClass)#%d (0) {} != string(20) "-9223372036854775808"
|
||||
object(stdClass)#%d (0) {} != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(stdClass)#%d (0) {} != string(0) ""
|
||||
object(stdClass)#%d (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
== int(1)
|
||||
object(stdClass)#%d (0) {}
|
||||
Notice: Object of class stdClass could not be converted to double in %s on line %d
|
||||
!= float(2.5)
|
||||
object(stdClass)#%d (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= int(0)
|
||||
object(stdClass)#%d (0) {} != string(6) "string"
|
||||
object(stdClass)#%d (0) {} != string(3) "123"
|
||||
object(stdClass)#%d (0) {} != string(3) "2.5"
|
||||
object(stdClass)#%d (0) {} != NULL
|
||||
object(stdClass)#%d (0) {} == bool(true)
|
||||
object(stdClass)#%d (0) {} != bool(false)
|
||||
object(stdClass)#%d (0) {} == object(stdClass)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} == object(stdClass)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} != object(test)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} != array(0) {}
|
||||
object(stdClass)#%d (0) {}
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= int(-9223372036854775808)
|
||||
object(stdClass)#%d (0) {} != string(20) "-9223372036854775808"
|
||||
object(test)#%d (0) {} != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(test)#%d (0) {} != string(0) ""
|
||||
object(test)#%d (0) {}
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
== int(1)
|
||||
object(test)#%d (0) {}
|
||||
Notice: Object of class test could not be converted to double in %s on line %d
|
||||
!= float(2.5)
|
||||
object(test)#%d (0) {}
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
!= int(0)
|
||||
object(test)#%d (0) {} != string(6) "string"
|
||||
object(test)#%d (0) {} != string(3) "123"
|
||||
object(test)#%d (0) {} != string(3) "2.5"
|
||||
object(test)#%d (0) {} != NULL
|
||||
object(test)#%d (0) {} == bool(true)
|
||||
object(test)#%d (0) {} != bool(false)
|
||||
object(test)#%d (0) {} != object(stdClass)#%d (0) {}
|
||||
object(test)#%d (0) {} != object(stdClass)#%d (0) {}
|
||||
object(test)#%d (0) {} == object(test)#%d (0) {}
|
||||
object(test)#%d (0) {} != array(0) {}
|
||||
object(test)#%d (0) {}
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
!= int(-9223372036854775808)
|
||||
object(test)#%d (0) {} != string(20) "-9223372036854775808"
|
||||
array(0) {} != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
array(0) {} != string(0) ""
|
||||
array(0) {} != int(1)
|
||||
array(0) {} != float(2.5)
|
||||
array(0) {} != int(0)
|
||||
array(0) {} != string(6) "string"
|
||||
array(0) {} != string(3) "123"
|
||||
array(0) {} != string(3) "2.5"
|
||||
array(0) {} == NULL
|
||||
array(0) {} != bool(true)
|
||||
array(0) {} == bool(false)
|
||||
array(0) {} != object(stdClass)#%d (0) {}
|
||||
array(0) {} != object(stdClass)#%d (0) {}
|
||||
array(0) {} != object(test)#%d (0) {}
|
||||
array(0) {} == array(0) {}
|
||||
array(0) {} != int(-9223372036854775808)
|
||||
array(0) {} != string(20) "-9223372036854775808"
|
||||
int(-9223372036854775808) != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(-9223372036854775808) != string(0) ""
|
||||
int(-9223372036854775808) != int(1)
|
||||
int(-9223372036854775808) != float(2.5)
|
||||
int(-9223372036854775808) != int(0)
|
||||
int(-9223372036854775808) != string(6) "string"
|
||||
int(-9223372036854775808) != string(3) "123"
|
||||
int(-9223372036854775808) != string(3) "2.5"
|
||||
int(-9223372036854775808) != NULL
|
||||
int(-9223372036854775808) == bool(true)
|
||||
int(-9223372036854775808) != bool(false)
|
||||
int(-9223372036854775808)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= object(stdClass)#%d (0) {}
|
||||
int(-9223372036854775808)
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
!= object(stdClass)#%d (0) {}
|
||||
int(-9223372036854775808)
|
||||
Notice: Object of class test could not be converted to int in %s on line %d
|
||||
!= object(test)#%d (0) {}
|
||||
int(-9223372036854775808) != array(0) {}
|
||||
int(-9223372036854775808) == int(-9223372036854775808)
|
||||
int(-9223372036854775808) == string(20) "-9223372036854775808"
|
||||
string(20) "-9223372036854775808" != array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(20) "-9223372036854775808" != string(0) ""
|
||||
string(20) "-9223372036854775808" != int(1)
|
||||
string(20) "-9223372036854775808" != float(2.5)
|
||||
string(20) "-9223372036854775808" != int(0)
|
||||
string(20) "-9223372036854775808" != string(6) "string"
|
||||
string(20) "-9223372036854775808" != string(3) "123"
|
||||
string(20) "-9223372036854775808" != string(3) "2.5"
|
||||
string(20) "-9223372036854775808" != NULL
|
||||
string(20) "-9223372036854775808" == bool(true)
|
||||
string(20) "-9223372036854775808" != bool(false)
|
||||
string(20) "-9223372036854775808" != object(stdClass)#%d (0) {}
|
||||
string(20) "-9223372036854775808" != object(stdClass)#%d (0) {}
|
||||
string(20) "-9223372036854775808" != object(test)#%d (0) {}
|
||||
string(20) "-9223372036854775808" != array(0) {}
|
||||
string(20) "-9223372036854775808" == int(-9223372036854775808)
|
||||
string(20) "-9223372036854775808" == string(20) "-9223372036854775808"
|
||||
Done
|
||||
@@ -1,341 +0,0 @@
|
||||
--TEST--
|
||||
comparing different variables for identity
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
}
|
||||
|
||||
$a = array(
|
||||
array(1,2,3),
|
||||
"",
|
||||
1,
|
||||
2.5,
|
||||
0,
|
||||
"string",
|
||||
"123",
|
||||
"2.5",
|
||||
NULL,
|
||||
true,
|
||||
false,
|
||||
new stdclass,
|
||||
new stdclass,
|
||||
new test,
|
||||
array(),
|
||||
-PHP_INT_MAX-1,
|
||||
(string)(-PHP_INT_MAX-1),
|
||||
);
|
||||
|
||||
$var_cnt = count($a);
|
||||
|
||||
function my_dump($var) {
|
||||
ob_start();
|
||||
var_dump($var);
|
||||
$buf = ob_get_clean();
|
||||
echo str_replace("\n", "", $buf);
|
||||
}
|
||||
|
||||
foreach($a as $var) {
|
||||
for ($i = 0; $i < $var_cnt; $i++) {
|
||||
my_dump($var);
|
||||
echo ($var === $a[$i]) ? " === " : " !== ";
|
||||
my_dump($a[$i]);
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} === array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== string(0) ""
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== int(1)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== float(2.5)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== int(0)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== string(6) "string"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== string(3) "123"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== string(3) "2.5"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== NULL
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== bool(true)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== bool(false)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== object(stdClass)#1 (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== object(stdClass)#2 (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== object(test)#3 (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== array(0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== int(-2147483648)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== string(11) "-2147483648"
|
||||
string(0) "" !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(0) "" === string(0) ""
|
||||
string(0) "" !== int(1)
|
||||
string(0) "" !== float(2.5)
|
||||
string(0) "" !== int(0)
|
||||
string(0) "" !== string(6) "string"
|
||||
string(0) "" !== string(3) "123"
|
||||
string(0) "" !== string(3) "2.5"
|
||||
string(0) "" !== NULL
|
||||
string(0) "" !== bool(true)
|
||||
string(0) "" !== bool(false)
|
||||
string(0) "" !== object(stdClass)#1 (0) {}
|
||||
string(0) "" !== object(stdClass)#2 (0) {}
|
||||
string(0) "" !== object(test)#3 (0) {}
|
||||
string(0) "" !== array(0) {}
|
||||
string(0) "" !== int(-2147483648)
|
||||
string(0) "" !== string(11) "-2147483648"
|
||||
int(1) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(1) !== string(0) ""
|
||||
int(1) === int(1)
|
||||
int(1) !== float(2.5)
|
||||
int(1) !== int(0)
|
||||
int(1) !== string(6) "string"
|
||||
int(1) !== string(3) "123"
|
||||
int(1) !== string(3) "2.5"
|
||||
int(1) !== NULL
|
||||
int(1) !== bool(true)
|
||||
int(1) !== bool(false)
|
||||
int(1) !== object(stdClass)#1 (0) {}
|
||||
int(1) !== object(stdClass)#2 (0) {}
|
||||
int(1) !== object(test)#3 (0) {}
|
||||
int(1) !== array(0) {}
|
||||
int(1) !== int(-2147483648)
|
||||
int(1) !== string(11) "-2147483648"
|
||||
float(2.5) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
float(2.5) !== string(0) ""
|
||||
float(2.5) !== int(1)
|
||||
float(2.5) === float(2.5)
|
||||
float(2.5) !== int(0)
|
||||
float(2.5) !== string(6) "string"
|
||||
float(2.5) !== string(3) "123"
|
||||
float(2.5) !== string(3) "2.5"
|
||||
float(2.5) !== NULL
|
||||
float(2.5) !== bool(true)
|
||||
float(2.5) !== bool(false)
|
||||
float(2.5) !== object(stdClass)#1 (0) {}
|
||||
float(2.5) !== object(stdClass)#2 (0) {}
|
||||
float(2.5) !== object(test)#3 (0) {}
|
||||
float(2.5) !== array(0) {}
|
||||
float(2.5) !== int(-2147483648)
|
||||
float(2.5) !== string(11) "-2147483648"
|
||||
int(0) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(0) !== string(0) ""
|
||||
int(0) !== int(1)
|
||||
int(0) !== float(2.5)
|
||||
int(0) === int(0)
|
||||
int(0) !== string(6) "string"
|
||||
int(0) !== string(3) "123"
|
||||
int(0) !== string(3) "2.5"
|
||||
int(0) !== NULL
|
||||
int(0) !== bool(true)
|
||||
int(0) !== bool(false)
|
||||
int(0) !== object(stdClass)#1 (0) {}
|
||||
int(0) !== object(stdClass)#2 (0) {}
|
||||
int(0) !== object(test)#3 (0) {}
|
||||
int(0) !== array(0) {}
|
||||
int(0) !== int(-2147483648)
|
||||
int(0) !== string(11) "-2147483648"
|
||||
string(6) "string" !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(6) "string" !== string(0) ""
|
||||
string(6) "string" !== int(1)
|
||||
string(6) "string" !== float(2.5)
|
||||
string(6) "string" !== int(0)
|
||||
string(6) "string" === string(6) "string"
|
||||
string(6) "string" !== string(3) "123"
|
||||
string(6) "string" !== string(3) "2.5"
|
||||
string(6) "string" !== NULL
|
||||
string(6) "string" !== bool(true)
|
||||
string(6) "string" !== bool(false)
|
||||
string(6) "string" !== object(stdClass)#1 (0) {}
|
||||
string(6) "string" !== object(stdClass)#2 (0) {}
|
||||
string(6) "string" !== object(test)#3 (0) {}
|
||||
string(6) "string" !== array(0) {}
|
||||
string(6) "string" !== int(-2147483648)
|
||||
string(6) "string" !== string(11) "-2147483648"
|
||||
string(3) "123" !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(3) "123" !== string(0) ""
|
||||
string(3) "123" !== int(1)
|
||||
string(3) "123" !== float(2.5)
|
||||
string(3) "123" !== int(0)
|
||||
string(3) "123" !== string(6) "string"
|
||||
string(3) "123" === string(3) "123"
|
||||
string(3) "123" !== string(3) "2.5"
|
||||
string(3) "123" !== NULL
|
||||
string(3) "123" !== bool(true)
|
||||
string(3) "123" !== bool(false)
|
||||
string(3) "123" !== object(stdClass)#1 (0) {}
|
||||
string(3) "123" !== object(stdClass)#2 (0) {}
|
||||
string(3) "123" !== object(test)#3 (0) {}
|
||||
string(3) "123" !== array(0) {}
|
||||
string(3) "123" !== int(-2147483648)
|
||||
string(3) "123" !== string(11) "-2147483648"
|
||||
string(3) "2.5" !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(3) "2.5" !== string(0) ""
|
||||
string(3) "2.5" !== int(1)
|
||||
string(3) "2.5" !== float(2.5)
|
||||
string(3) "2.5" !== int(0)
|
||||
string(3) "2.5" !== string(6) "string"
|
||||
string(3) "2.5" !== string(3) "123"
|
||||
string(3) "2.5" === string(3) "2.5"
|
||||
string(3) "2.5" !== NULL
|
||||
string(3) "2.5" !== bool(true)
|
||||
string(3) "2.5" !== bool(false)
|
||||
string(3) "2.5" !== object(stdClass)#1 (0) {}
|
||||
string(3) "2.5" !== object(stdClass)#2 (0) {}
|
||||
string(3) "2.5" !== object(test)#3 (0) {}
|
||||
string(3) "2.5" !== array(0) {}
|
||||
string(3) "2.5" !== int(-2147483648)
|
||||
string(3) "2.5" !== string(11) "-2147483648"
|
||||
NULL !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
NULL !== string(0) ""
|
||||
NULL !== int(1)
|
||||
NULL !== float(2.5)
|
||||
NULL !== int(0)
|
||||
NULL !== string(6) "string"
|
||||
NULL !== string(3) "123"
|
||||
NULL !== string(3) "2.5"
|
||||
NULL === NULL
|
||||
NULL !== bool(true)
|
||||
NULL !== bool(false)
|
||||
NULL !== object(stdClass)#1 (0) {}
|
||||
NULL !== object(stdClass)#2 (0) {}
|
||||
NULL !== object(test)#3 (0) {}
|
||||
NULL !== array(0) {}
|
||||
NULL !== int(-2147483648)
|
||||
NULL !== string(11) "-2147483648"
|
||||
bool(true) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
bool(true) !== string(0) ""
|
||||
bool(true) !== int(1)
|
||||
bool(true) !== float(2.5)
|
||||
bool(true) !== int(0)
|
||||
bool(true) !== string(6) "string"
|
||||
bool(true) !== string(3) "123"
|
||||
bool(true) !== string(3) "2.5"
|
||||
bool(true) !== NULL
|
||||
bool(true) === bool(true)
|
||||
bool(true) !== bool(false)
|
||||
bool(true) !== object(stdClass)#1 (0) {}
|
||||
bool(true) !== object(stdClass)#2 (0) {}
|
||||
bool(true) !== object(test)#3 (0) {}
|
||||
bool(true) !== array(0) {}
|
||||
bool(true) !== int(-2147483648)
|
||||
bool(true) !== string(11) "-2147483648"
|
||||
bool(false) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
bool(false) !== string(0) ""
|
||||
bool(false) !== int(1)
|
||||
bool(false) !== float(2.5)
|
||||
bool(false) !== int(0)
|
||||
bool(false) !== string(6) "string"
|
||||
bool(false) !== string(3) "123"
|
||||
bool(false) !== string(3) "2.5"
|
||||
bool(false) !== NULL
|
||||
bool(false) !== bool(true)
|
||||
bool(false) === bool(false)
|
||||
bool(false) !== object(stdClass)#1 (0) {}
|
||||
bool(false) !== object(stdClass)#2 (0) {}
|
||||
bool(false) !== object(test)#3 (0) {}
|
||||
bool(false) !== array(0) {}
|
||||
bool(false) !== int(-2147483648)
|
||||
bool(false) !== string(11) "-2147483648"
|
||||
object(stdClass)#1 (0) {} !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(stdClass)#1 (0) {} !== string(0) ""
|
||||
object(stdClass)#1 (0) {} !== int(1)
|
||||
object(stdClass)#1 (0) {} !== float(2.5)
|
||||
object(stdClass)#1 (0) {} !== int(0)
|
||||
object(stdClass)#1 (0) {} !== string(6) "string"
|
||||
object(stdClass)#1 (0) {} !== string(3) "123"
|
||||
object(stdClass)#1 (0) {} !== string(3) "2.5"
|
||||
object(stdClass)#1 (0) {} !== NULL
|
||||
object(stdClass)#1 (0) {} !== bool(true)
|
||||
object(stdClass)#1 (0) {} !== bool(false)
|
||||
object(stdClass)#1 (0) {} === object(stdClass)#1 (0) {}
|
||||
object(stdClass)#1 (0) {} !== object(stdClass)#2 (0) {}
|
||||
object(stdClass)#1 (0) {} !== object(test)#3 (0) {}
|
||||
object(stdClass)#1 (0) {} !== array(0) {}
|
||||
object(stdClass)#1 (0) {} !== int(-2147483648)
|
||||
object(stdClass)#1 (0) {} !== string(11) "-2147483648"
|
||||
object(stdClass)#2 (0) {} !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(stdClass)#2 (0) {} !== string(0) ""
|
||||
object(stdClass)#2 (0) {} !== int(1)
|
||||
object(stdClass)#2 (0) {} !== float(2.5)
|
||||
object(stdClass)#2 (0) {} !== int(0)
|
||||
object(stdClass)#2 (0) {} !== string(6) "string"
|
||||
object(stdClass)#2 (0) {} !== string(3) "123"
|
||||
object(stdClass)#2 (0) {} !== string(3) "2.5"
|
||||
object(stdClass)#2 (0) {} !== NULL
|
||||
object(stdClass)#2 (0) {} !== bool(true)
|
||||
object(stdClass)#2 (0) {} !== bool(false)
|
||||
object(stdClass)#2 (0) {} !== object(stdClass)#1 (0) {}
|
||||
object(stdClass)#2 (0) {} === object(stdClass)#2 (0) {}
|
||||
object(stdClass)#2 (0) {} !== object(test)#3 (0) {}
|
||||
object(stdClass)#2 (0) {} !== array(0) {}
|
||||
object(stdClass)#2 (0) {} !== int(-2147483648)
|
||||
object(stdClass)#2 (0) {} !== string(11) "-2147483648"
|
||||
object(test)#3 (0) {} !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(test)#3 (0) {} !== string(0) ""
|
||||
object(test)#3 (0) {} !== int(1)
|
||||
object(test)#3 (0) {} !== float(2.5)
|
||||
object(test)#3 (0) {} !== int(0)
|
||||
object(test)#3 (0) {} !== string(6) "string"
|
||||
object(test)#3 (0) {} !== string(3) "123"
|
||||
object(test)#3 (0) {} !== string(3) "2.5"
|
||||
object(test)#3 (0) {} !== NULL
|
||||
object(test)#3 (0) {} !== bool(true)
|
||||
object(test)#3 (0) {} !== bool(false)
|
||||
object(test)#3 (0) {} !== object(stdClass)#1 (0) {}
|
||||
object(test)#3 (0) {} !== object(stdClass)#2 (0) {}
|
||||
object(test)#3 (0) {} === object(test)#3 (0) {}
|
||||
object(test)#3 (0) {} !== array(0) {}
|
||||
object(test)#3 (0) {} !== int(-2147483648)
|
||||
object(test)#3 (0) {} !== string(11) "-2147483648"
|
||||
array(0) {} !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
array(0) {} !== string(0) ""
|
||||
array(0) {} !== int(1)
|
||||
array(0) {} !== float(2.5)
|
||||
array(0) {} !== int(0)
|
||||
array(0) {} !== string(6) "string"
|
||||
array(0) {} !== string(3) "123"
|
||||
array(0) {} !== string(3) "2.5"
|
||||
array(0) {} !== NULL
|
||||
array(0) {} !== bool(true)
|
||||
array(0) {} !== bool(false)
|
||||
array(0) {} !== object(stdClass)#1 (0) {}
|
||||
array(0) {} !== object(stdClass)#2 (0) {}
|
||||
array(0) {} !== object(test)#3 (0) {}
|
||||
array(0) {} === array(0) {}
|
||||
array(0) {} !== int(-2147483648)
|
||||
array(0) {} !== string(11) "-2147483648"
|
||||
int(-2147483648) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(-2147483648) !== string(0) ""
|
||||
int(-2147483648) !== int(1)
|
||||
int(-2147483648) !== float(2.5)
|
||||
int(-2147483648) !== int(0)
|
||||
int(-2147483648) !== string(6) "string"
|
||||
int(-2147483648) !== string(3) "123"
|
||||
int(-2147483648) !== string(3) "2.5"
|
||||
int(-2147483648) !== NULL
|
||||
int(-2147483648) !== bool(true)
|
||||
int(-2147483648) !== bool(false)
|
||||
int(-2147483648) !== object(stdClass)#1 (0) {}
|
||||
int(-2147483648) !== object(stdClass)#2 (0) {}
|
||||
int(-2147483648) !== object(test)#3 (0) {}
|
||||
int(-2147483648) !== array(0) {}
|
||||
int(-2147483648) === int(-2147483648)
|
||||
int(-2147483648) !== string(11) "-2147483648"
|
||||
string(11) "-2147483648" !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(11) "-2147483648" !== string(0) ""
|
||||
string(11) "-2147483648" !== int(1)
|
||||
string(11) "-2147483648" !== float(2.5)
|
||||
string(11) "-2147483648" !== int(0)
|
||||
string(11) "-2147483648" !== string(6) "string"
|
||||
string(11) "-2147483648" !== string(3) "123"
|
||||
string(11) "-2147483648" !== string(3) "2.5"
|
||||
string(11) "-2147483648" !== NULL
|
||||
string(11) "-2147483648" !== bool(true)
|
||||
string(11) "-2147483648" !== bool(false)
|
||||
string(11) "-2147483648" !== object(stdClass)#1 (0) {}
|
||||
string(11) "-2147483648" !== object(stdClass)#2 (0) {}
|
||||
string(11) "-2147483648" !== object(test)#3 (0) {}
|
||||
string(11) "-2147483648" !== array(0) {}
|
||||
string(11) "-2147483648" !== int(-2147483648)
|
||||
string(11) "-2147483648" === string(11) "-2147483648"
|
||||
Done
|
||||
@@ -1,341 +0,0 @@
|
||||
--TEST--
|
||||
comparing different variables for identity
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
}
|
||||
|
||||
$a = array(
|
||||
array(1,2,3),
|
||||
"",
|
||||
1,
|
||||
2.5,
|
||||
0,
|
||||
"string",
|
||||
"123",
|
||||
"2.5",
|
||||
NULL,
|
||||
true,
|
||||
false,
|
||||
new stdclass,
|
||||
new stdclass,
|
||||
new test,
|
||||
array(),
|
||||
-PHP_INT_MAX-1,
|
||||
(string)(-PHP_INT_MAX-1),
|
||||
);
|
||||
|
||||
$var_cnt = count($a);
|
||||
|
||||
function my_dump($var) {
|
||||
ob_start();
|
||||
var_dump($var);
|
||||
$buf = ob_get_clean();
|
||||
echo str_replace("\n", "", $buf);
|
||||
}
|
||||
|
||||
foreach($a as $var) {
|
||||
for ($i = 0; $i < $var_cnt; $i++) {
|
||||
my_dump($var);
|
||||
echo ($var === $a[$i]) ? " === " : " !== ";
|
||||
my_dump($a[$i]);
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} === array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== string(0) ""
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== int(1)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== float(2.5)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== int(0)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== string(6) "string"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== string(3) "123"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== string(3) "2.5"
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== NULL
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== bool(true)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== bool(false)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== object(stdClass)#%d (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== object(stdClass)#%d (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== object(test)#%d (0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== array(0) {}
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== int(-9223372036854775808)
|
||||
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)} !== string(20) "-9223372036854775808"
|
||||
string(0) "" !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(0) "" === string(0) ""
|
||||
string(0) "" !== int(1)
|
||||
string(0) "" !== float(2.5)
|
||||
string(0) "" !== int(0)
|
||||
string(0) "" !== string(6) "string"
|
||||
string(0) "" !== string(3) "123"
|
||||
string(0) "" !== string(3) "2.5"
|
||||
string(0) "" !== NULL
|
||||
string(0) "" !== bool(true)
|
||||
string(0) "" !== bool(false)
|
||||
string(0) "" !== object(stdClass)#%d (0) {}
|
||||
string(0) "" !== object(stdClass)#%d (0) {}
|
||||
string(0) "" !== object(test)#%d (0) {}
|
||||
string(0) "" !== array(0) {}
|
||||
string(0) "" !== int(-9223372036854775808)
|
||||
string(0) "" !== string(20) "-9223372036854775808"
|
||||
int(1) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(1) !== string(0) ""
|
||||
int(1) === int(1)
|
||||
int(1) !== float(2.5)
|
||||
int(1) !== int(0)
|
||||
int(1) !== string(6) "string"
|
||||
int(1) !== string(3) "123"
|
||||
int(1) !== string(3) "2.5"
|
||||
int(1) !== NULL
|
||||
int(1) !== bool(true)
|
||||
int(1) !== bool(false)
|
||||
int(1) !== object(stdClass)#%d (0) {}
|
||||
int(1) !== object(stdClass)#%d (0) {}
|
||||
int(1) !== object(test)#%d (0) {}
|
||||
int(1) !== array(0) {}
|
||||
int(1) !== int(-9223372036854775808)
|
||||
int(1) !== string(20) "-9223372036854775808"
|
||||
float(2.5) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
float(2.5) !== string(0) ""
|
||||
float(2.5) !== int(1)
|
||||
float(2.5) === float(2.5)
|
||||
float(2.5) !== int(0)
|
||||
float(2.5) !== string(6) "string"
|
||||
float(2.5) !== string(3) "123"
|
||||
float(2.5) !== string(3) "2.5"
|
||||
float(2.5) !== NULL
|
||||
float(2.5) !== bool(true)
|
||||
float(2.5) !== bool(false)
|
||||
float(2.5) !== object(stdClass)#%d (0) {}
|
||||
float(2.5) !== object(stdClass)#%d (0) {}
|
||||
float(2.5) !== object(test)#%d (0) {}
|
||||
float(2.5) !== array(0) {}
|
||||
float(2.5) !== int(-9223372036854775808)
|
||||
float(2.5) !== string(20) "-9223372036854775808"
|
||||
int(0) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(0) !== string(0) ""
|
||||
int(0) !== int(1)
|
||||
int(0) !== float(2.5)
|
||||
int(0) === int(0)
|
||||
int(0) !== string(6) "string"
|
||||
int(0) !== string(3) "123"
|
||||
int(0) !== string(3) "2.5"
|
||||
int(0) !== NULL
|
||||
int(0) !== bool(true)
|
||||
int(0) !== bool(false)
|
||||
int(0) !== object(stdClass)#%d (0) {}
|
||||
int(0) !== object(stdClass)#%d (0) {}
|
||||
int(0) !== object(test)#%d (0) {}
|
||||
int(0) !== array(0) {}
|
||||
int(0) !== int(-9223372036854775808)
|
||||
int(0) !== string(20) "-9223372036854775808"
|
||||
string(6) "string" !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(6) "string" !== string(0) ""
|
||||
string(6) "string" !== int(1)
|
||||
string(6) "string" !== float(2.5)
|
||||
string(6) "string" !== int(0)
|
||||
string(6) "string" === string(6) "string"
|
||||
string(6) "string" !== string(3) "123"
|
||||
string(6) "string" !== string(3) "2.5"
|
||||
string(6) "string" !== NULL
|
||||
string(6) "string" !== bool(true)
|
||||
string(6) "string" !== bool(false)
|
||||
string(6) "string" !== object(stdClass)#%d (0) {}
|
||||
string(6) "string" !== object(stdClass)#%d (0) {}
|
||||
string(6) "string" !== object(test)#%d (0) {}
|
||||
string(6) "string" !== array(0) {}
|
||||
string(6) "string" !== int(-9223372036854775808)
|
||||
string(6) "string" !== string(20) "-9223372036854775808"
|
||||
string(3) "123" !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(3) "123" !== string(0) ""
|
||||
string(3) "123" !== int(1)
|
||||
string(3) "123" !== float(2.5)
|
||||
string(3) "123" !== int(0)
|
||||
string(3) "123" !== string(6) "string"
|
||||
string(3) "123" === string(3) "123"
|
||||
string(3) "123" !== string(3) "2.5"
|
||||
string(3) "123" !== NULL
|
||||
string(3) "123" !== bool(true)
|
||||
string(3) "123" !== bool(false)
|
||||
string(3) "123" !== object(stdClass)#%d (0) {}
|
||||
string(3) "123" !== object(stdClass)#%d (0) {}
|
||||
string(3) "123" !== object(test)#%d (0) {}
|
||||
string(3) "123" !== array(0) {}
|
||||
string(3) "123" !== int(-9223372036854775808)
|
||||
string(3) "123" !== string(20) "-9223372036854775808"
|
||||
string(3) "2.5" !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(3) "2.5" !== string(0) ""
|
||||
string(3) "2.5" !== int(1)
|
||||
string(3) "2.5" !== float(2.5)
|
||||
string(3) "2.5" !== int(0)
|
||||
string(3) "2.5" !== string(6) "string"
|
||||
string(3) "2.5" !== string(3) "123"
|
||||
string(3) "2.5" === string(3) "2.5"
|
||||
string(3) "2.5" !== NULL
|
||||
string(3) "2.5" !== bool(true)
|
||||
string(3) "2.5" !== bool(false)
|
||||
string(3) "2.5" !== object(stdClass)#%d (0) {}
|
||||
string(3) "2.5" !== object(stdClass)#%d (0) {}
|
||||
string(3) "2.5" !== object(test)#%d (0) {}
|
||||
string(3) "2.5" !== array(0) {}
|
||||
string(3) "2.5" !== int(-9223372036854775808)
|
||||
string(3) "2.5" !== string(20) "-9223372036854775808"
|
||||
NULL !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
NULL !== string(0) ""
|
||||
NULL !== int(1)
|
||||
NULL !== float(2.5)
|
||||
NULL !== int(0)
|
||||
NULL !== string(6) "string"
|
||||
NULL !== string(3) "123"
|
||||
NULL !== string(3) "2.5"
|
||||
NULL === NULL
|
||||
NULL !== bool(true)
|
||||
NULL !== bool(false)
|
||||
NULL !== object(stdClass)#%d (0) {}
|
||||
NULL !== object(stdClass)#%d (0) {}
|
||||
NULL !== object(test)#%d (0) {}
|
||||
NULL !== array(0) {}
|
||||
NULL !== int(-9223372036854775808)
|
||||
NULL !== string(20) "-9223372036854775808"
|
||||
bool(true) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
bool(true) !== string(0) ""
|
||||
bool(true) !== int(1)
|
||||
bool(true) !== float(2.5)
|
||||
bool(true) !== int(0)
|
||||
bool(true) !== string(6) "string"
|
||||
bool(true) !== string(3) "123"
|
||||
bool(true) !== string(3) "2.5"
|
||||
bool(true) !== NULL
|
||||
bool(true) === bool(true)
|
||||
bool(true) !== bool(false)
|
||||
bool(true) !== object(stdClass)#%d (0) {}
|
||||
bool(true) !== object(stdClass)#%d (0) {}
|
||||
bool(true) !== object(test)#%d (0) {}
|
||||
bool(true) !== array(0) {}
|
||||
bool(true) !== int(-9223372036854775808)
|
||||
bool(true) !== string(20) "-9223372036854775808"
|
||||
bool(false) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
bool(false) !== string(0) ""
|
||||
bool(false) !== int(1)
|
||||
bool(false) !== float(2.5)
|
||||
bool(false) !== int(0)
|
||||
bool(false) !== string(6) "string"
|
||||
bool(false) !== string(3) "123"
|
||||
bool(false) !== string(3) "2.5"
|
||||
bool(false) !== NULL
|
||||
bool(false) !== bool(true)
|
||||
bool(false) === bool(false)
|
||||
bool(false) !== object(stdClass)#%d (0) {}
|
||||
bool(false) !== object(stdClass)#%d (0) {}
|
||||
bool(false) !== object(test)#%d (0) {}
|
||||
bool(false) !== array(0) {}
|
||||
bool(false) !== int(-9223372036854775808)
|
||||
bool(false) !== string(20) "-9223372036854775808"
|
||||
object(stdClass)#%d (0) {} !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(stdClass)#%d (0) {} !== string(0) ""
|
||||
object(stdClass)#%d (0) {} !== int(1)
|
||||
object(stdClass)#%d (0) {} !== float(2.5)
|
||||
object(stdClass)#%d (0) {} !== int(0)
|
||||
object(stdClass)#%d (0) {} !== string(6) "string"
|
||||
object(stdClass)#%d (0) {} !== string(3) "123"
|
||||
object(stdClass)#%d (0) {} !== string(3) "2.5"
|
||||
object(stdClass)#%d (0) {} !== NULL
|
||||
object(stdClass)#%d (0) {} !== bool(true)
|
||||
object(stdClass)#%d (0) {} !== bool(false)
|
||||
object(stdClass)#%d (0) {} === object(stdClass)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} !== object(stdClass)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} !== object(test)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} !== array(0) {}
|
||||
object(stdClass)#%d (0) {} !== int(-9223372036854775808)
|
||||
object(stdClass)#%d (0) {} !== string(20) "-9223372036854775808"
|
||||
object(stdClass)#%d (0) {} !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(stdClass)#%d (0) {} !== string(0) ""
|
||||
object(stdClass)#%d (0) {} !== int(1)
|
||||
object(stdClass)#%d (0) {} !== float(2.5)
|
||||
object(stdClass)#%d (0) {} !== int(0)
|
||||
object(stdClass)#%d (0) {} !== string(6) "string"
|
||||
object(stdClass)#%d (0) {} !== string(3) "123"
|
||||
object(stdClass)#%d (0) {} !== string(3) "2.5"
|
||||
object(stdClass)#%d (0) {} !== NULL
|
||||
object(stdClass)#%d (0) {} !== bool(true)
|
||||
object(stdClass)#%d (0) {} !== bool(false)
|
||||
object(stdClass)#%d (0) {} !== object(stdClass)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} === object(stdClass)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} !== object(test)#%d (0) {}
|
||||
object(stdClass)#%d (0) {} !== array(0) {}
|
||||
object(stdClass)#%d (0) {} !== int(-9223372036854775808)
|
||||
object(stdClass)#%d (0) {} !== string(20) "-9223372036854775808"
|
||||
object(test)#%d (0) {} !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
object(test)#%d (0) {} !== string(0) ""
|
||||
object(test)#%d (0) {} !== int(1)
|
||||
object(test)#%d (0) {} !== float(2.5)
|
||||
object(test)#%d (0) {} !== int(0)
|
||||
object(test)#%d (0) {} !== string(6) "string"
|
||||
object(test)#%d (0) {} !== string(3) "123"
|
||||
object(test)#%d (0) {} !== string(3) "2.5"
|
||||
object(test)#%d (0) {} !== NULL
|
||||
object(test)#%d (0) {} !== bool(true)
|
||||
object(test)#%d (0) {} !== bool(false)
|
||||
object(test)#%d (0) {} !== object(stdClass)#%d (0) {}
|
||||
object(test)#%d (0) {} !== object(stdClass)#%d (0) {}
|
||||
object(test)#%d (0) {} === object(test)#%d (0) {}
|
||||
object(test)#%d (0) {} !== array(0) {}
|
||||
object(test)#%d (0) {} !== int(-9223372036854775808)
|
||||
object(test)#%d (0) {} !== string(20) "-9223372036854775808"
|
||||
array(0) {} !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
array(0) {} !== string(0) ""
|
||||
array(0) {} !== int(1)
|
||||
array(0) {} !== float(2.5)
|
||||
array(0) {} !== int(0)
|
||||
array(0) {} !== string(6) "string"
|
||||
array(0) {} !== string(3) "123"
|
||||
array(0) {} !== string(3) "2.5"
|
||||
array(0) {} !== NULL
|
||||
array(0) {} !== bool(true)
|
||||
array(0) {} !== bool(false)
|
||||
array(0) {} !== object(stdClass)#%d (0) {}
|
||||
array(0) {} !== object(stdClass)#%d (0) {}
|
||||
array(0) {} !== object(test)#%d (0) {}
|
||||
array(0) {} === array(0) {}
|
||||
array(0) {} !== int(-9223372036854775808)
|
||||
array(0) {} !== string(20) "-9223372036854775808"
|
||||
int(-9223372036854775808) !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
int(-9223372036854775808) !== string(0) ""
|
||||
int(-9223372036854775808) !== int(1)
|
||||
int(-9223372036854775808) !== float(2.5)
|
||||
int(-9223372036854775808) !== int(0)
|
||||
int(-9223372036854775808) !== string(6) "string"
|
||||
int(-9223372036854775808) !== string(3) "123"
|
||||
int(-9223372036854775808) !== string(3) "2.5"
|
||||
int(-9223372036854775808) !== NULL
|
||||
int(-9223372036854775808) !== bool(true)
|
||||
int(-9223372036854775808) !== bool(false)
|
||||
int(-9223372036854775808) !== object(stdClass)#%d (0) {}
|
||||
int(-9223372036854775808) !== object(stdClass)#%d (0) {}
|
||||
int(-9223372036854775808) !== object(test)#%d (0) {}
|
||||
int(-9223372036854775808) !== array(0) {}
|
||||
int(-9223372036854775808) === int(-9223372036854775808)
|
||||
int(-9223372036854775808) !== string(20) "-9223372036854775808"
|
||||
string(20) "-9223372036854775808" !== array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3)}
|
||||
string(20) "-9223372036854775808" !== string(0) ""
|
||||
string(20) "-9223372036854775808" !== int(1)
|
||||
string(20) "-9223372036854775808" !== float(2.5)
|
||||
string(20) "-9223372036854775808" !== int(0)
|
||||
string(20) "-9223372036854775808" !== string(6) "string"
|
||||
string(20) "-9223372036854775808" !== string(3) "123"
|
||||
string(20) "-9223372036854775808" !== string(3) "2.5"
|
||||
string(20) "-9223372036854775808" !== NULL
|
||||
string(20) "-9223372036854775808" !== bool(true)
|
||||
string(20) "-9223372036854775808" !== bool(false)
|
||||
string(20) "-9223372036854775808" !== object(stdClass)#%d (0) {}
|
||||
string(20) "-9223372036854775808" !== object(stdClass)#%d (0) {}
|
||||
string(20) "-9223372036854775808" !== object(test)#%d (0) {}
|
||||
string(20) "-9223372036854775808" !== array(0) {}
|
||||
string(20) "-9223372036854775808" !== int(-9223372036854775808)
|
||||
string(20) "-9223372036854775808" === string(20) "-9223372036854775808"
|
||||
Done
|
||||
Loaded 100 of 2115 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user