diff --git a/bin/createNewsEntry b/bin/createNewsEntry index ab00e0013d..ba0af65ed5 100755 --- a/bin/createNewsEntry +++ b/bin/createNewsEntry @@ -1,4 +1,4 @@ -#!/usr/local/bin/php +#!/usr/share/php createElement($name); } - foreach($attrs as $k => $v) { + foreach((array)$attrs as $k => $v) { $n->setAttribute($k, $v); } if ($to) { diff --git a/conferences/index.php b/conferences/index.php index 848f718066..84c55f1001 100644 --- a/conferences/index.php +++ b/conferences/index.php @@ -1,29 +1,34 @@ '', +)); -$layout_workaround = <<< EOT -
- Are you planning a PHP related conference and want it listed here? - Let us know. -
-+ Are you planning a PHP related conference and want it listed here? + Let us know. +
+Have an upcoming PHP user group meeting? Holding a PHP training session? Submit your event here, and after it has been approved, it will be listed on the PHP.net homepage and appear in our full event listings.
+ ++
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.
+You can grab our news as an Atom feed.
+22-Apr-2008
++ The PHP team is once again proud to participate in the + Google Summer of Code. + Ten students will "flip bits instead of burgers" this summer: + +
+Update (May 11th): + Unfortunately Nicholas Sloan had to drop out of the + program, but he will be replaced by Rudy Nappée working on the same application.
+01-May-2008
+The PHP development team would like to announce the immediateavailability of PHP 5.2.6. This release focuses on improving the stability ofthe PHP 5.2.x branch with over 120 bug fixes, several of which are security related.All users of PHP are encouraged to upgrade to this release.
+ +Further details about the PHP 5.2.6 release can be found in the release announcement for 5.2.6, the full list of changes is available in the ChangeLog for PHP 5.
++ Security Enhancements and Fixes in PHP 5.2.6: +
+Update (May 6th): The Windows installers were missing the XSL + and IMAP extensions.
+Update (May 3rd): The Windows archives were missing the XSL + + and IMAP extensions.
+30-Mar-2008
+The PHP-QA team would like to announce the + TestFest for the month of + May 2008. The TestFest is an event that aims at improving the + code coverage of the + test suite for the PHP + language itself. As part of this event, local User Groups (UG) are + invited to join the TestFest. These UGs can meet physically or come + together virtually. The point however is that people network to learn + together. Aside from being an opportunity for all of you to make friends + with like minded people in your (virtual) community, it also will + hopefully reduce the work load for the PHP.net mentors.
+ +All it takes is someone to organize a UG to spearhead the event and + to get others involved in + writing phpt tests. + The submissions will then be reviewed by members of php.net before + getting included in the official test suite. Please visit the + TestFest homepage to get + additional details on the TestFest on how to get involved, either as a + UG or by setting up the necessary infrastructure.
+19-Mar-2008
+Once again we are glad to announce that we have been accepted to be a Google Summer of Code project. See our program for this year's GSoC.
+ +We would like to take this opportunity to say thanks to Google Inc. for this privilege to participate once again, and would like to invite everyone to look at our list of ideas: http://wiki.php.net/gsoc/2008. Students are of course more than welcome to come up with their own ideas for their proposals and we will consider each and every application that we will receive.
+So once again, thanks to everyone who is involved in this magnificent journey and we hope to see many of you great students and open source passionate join us in our most enjoyable Google Summer of Code projects.
+03-Jan-2008
++ The PHP development team would like to announce the immediate availability of + PHP 4.4.8. It continues to improve the security and the stability of the 4.4 + branch and all users are strongly encouraged to upgrade to it as soon as + possible. This release wraps up all the outstanding patches for the PHP 4.4 + series, and is therefore the last normal PHP 4.4 release. If necessary, + releases to address security issues could be made until 2008-08-08. +
++ Security Enhancements and Fixes in PHP 4.4.8: +
++ For a full list of changes in PHP 4.4.8, see the ChangeLog. +
+17-May-2008
++ The Open Source Developers' Conference 2008 is a conference run by open + source developers, for developers and business people. It covers + numerous programming languages across a range of operating systems, and + related topics such as business processes, licensing, and strategy. + Talks vary from introductory pieces through to the deeply technical. It + is a great opportunity to meet, share, and learn with like-minded + individuals. + +
++ This year, the conference will be held in Sydney, Australia during the + first week of December. If you are an Open Source maintainer, developer + or user, the organising committee would encourage you to submit a talk + proposal on open source tools, solutions, languages or technologies you + are working with. +
++ For more details, see: + http://osdc.com.au/2008/papers/cfp.html. +
++ If you have any questions or require assistance with your submission, + please don't hesitate to ask! + +
++ We continue to recognise the increasing importance of Open Source + in providing a medium for collaboration between individuals, + researchers, business and government. In recognition of this and + ensure a high standard of presentations, we intend to peer-review + all submitted papers. +
++ OSDC 2008 Sydney (Australia) - Key Program Dates: +
++ For all information, contacts and updates, see the OSDC conference + web site at http://osdc.com.au/2008/. +
+13-May-2008
+The elePHPants are now ready to make their 2008 generation. + PHP User groups, enthusiasts and companies that are interested in + groups of elePHPants, shall join this year's herd.
+ ++ElePHPants are a great link of the community, happily promoting your favorite +language in conferences, on work station, baby cribs and other unusual places. +Production prices make it possible for groups to raise funds, entice membership +or simply bring joy and PHP around. +
++Pre-register your herd of elePHPants +online, for big and small, +and join the world of blue elePHPants. +
+(PHP 4, PHP 5 )
+ strpos — Find position of first occurrence of a string +Last updated: Fri, 06 Jun 2008
+Returns the numeric position of the first occurrence of needle in the haystack string. Unlike the strrpos() before PHP 5, this function can take a full string as the needle parameter and the entire string will be used.
+Returns the position as an integer. If needle is not found, strpos() will return boolean FALSE.
+Warning
+This function may return Boolean FALSE, but may also return a non-Boolean value which + evaluates to FALSE, such as 0 or + "". Please read the section on Booleans for more + information. Use the === + operator for testing the return value of this + function.
+
+ <?php
$mystring = 'abc';
$findme = 'a';
$pos = strpos($mystring, $findme);
// Note our use of ===. Simply == would not work as expected
// because the position of 'a' was the 0th (first) character.
if ($pos === false) {
echo "The string '$findme' was not found in the string '$mystring'";
} else {
echo "The string '$findme' was found in the string '$mystring'";
echo " and exists at position $pos";
}
// We can search for the character, ignoring anything before the offset
$newstring = 'abcdef abcdef';
$pos = strpos($newstring, 'a', 1); // $pos = 7, not 0
?>
+
+
+
+
+Hello! I was founding a function, which finds any occurence of a string (no: first occurence). I wasn't, so I maked this function! It may be very useful.
+
+<?php
+
+int strnpos(string $haystack, mixed $needle, int $occurence);
+
+?>
+
+Example:
+
+<?php
+
+strnpos("I like the bananas. You like coke. We like chocolate.", "like", 2); // 24
+
+?>
+
+Here's code of this function:
+
+<?php
+
+function strnpos($base, $str, $n)
+ {
+ if ($n <= 0 || intval($n) != $n || substr_count($base, $str) < $n) return FALSE;
+
+ $str = strval($str);
+ $len = 0;
+
+ for ($i=0 ; $i<$n-1 ; ++$i)
+ {
+ if ( strpos($base, $str) === FALSE ) return FALSE;
+
+ $len += strlen( substr($base, 0, strpos($base, $str) + strlen($str)) );
+
+ $base = substr($base, strpos($base, $str) + strlen($str) );
+ }
+ return strpos($base, $str) + $len;
+ }
+
+?>
+
+
+
+This might be useful.
+
+class String{
+
+
+ //Look for a $needle in $haystack in any position
+ public static function contains(&$haystack, &$needle, &$offset)
+ {
+ $result = strpos($haystack, $needle, $offset);
+
+ return $result !== FALSE;
+ }
+
+ //intuitive implementation .. if not found returns -1.
+ public static function strpos(&$haystack, &$needle, &$offset)
+
+ {
+ $result = strpos($haystack, $needle, $offset);
+ if ($result === FALSE )
+ {
+
+ return -1;
+ }
+ return $result;
+
+ }
+
+}//String
+
+UL & OL:
+DEL, INS, SUB, SUP, ACRONYM:
+
+ I love Ruby PHP Sub and Sup, DOM
+
BLOCKQUOTE:
+++ ++ 2008-06-09: W3C launched a new Web Applications (WebApps) Working Group, co-Chaired by Art Barstow (Nokia) and Charles McCathieNevile (Opera Software). +
+
CITE, Q:
++ Now is the accepted time to make your regular, annual, good resolutions. Next week you can begin paving hell with them as usual. +
+Mark Twain
+ +Mark Twain said, that The lack of money is the root of all evil.
DFN:
++ PHP (a recursive acronym for PHP: Hypertext Preprocessor) is a computer scripting language, originally designed for producing dynamic web pages. It is for server-side scripting, but can be used from a command line interface or in standalone graphical applications. +
+ +KBD:
++ Please press <Alt>+<Enter> +
+ +VAR:
+
+ Let's get content_title from table content, with statement section_id = 1
.
+
PRE:
++- -- ------ -|--- +----- ------ |----- +||----| ||--|| ---| +||----- ---- ----| +||-----| |||| |----|-| +|| ----- -- -----| - +||- ----| -- |-----||- +||---||-- -- ------|-- +||--|| --|-- |--|------ +|| -|| |-- --- - ---- +|| -|| --|-|--| - ---| +|---||- |-----| |----- +|---|| |---- |----| +|----| --- |------ +------ -------- ++ +
CODE:
+
+ <?php
+ function hello () {
+ echo "Hello World!"; // say hello
+ }
+ ?>
+
+
+
+ + A good place to start is by skimming through the ever-growing list of frequently asked questions (with answers, of course). Then + have a look at the rest of the online manual and other resources in the documentation section. +
+ ++ Books are convenient resources to begin exploring or extend your + PHP knowledge. There are literally thousands of books available in + English and numerous in other languages. Search at your favourite + online or offline bookstore. You can search at + Amazon.com, or + go directly to + Amazon.de + or Amazon.fr + and search there. +
+ ++ There are a number of mailing lists devoted to talking about PHP and related + projects. This list describes them all, has + links to searchable archives for all of the lists, and explains how to + subscribe to the lists. +
+ ++ The PHP language newsgroup is comp.lang.php, available on any + news server around the globe. In addition to this many of our mailing + lists are also reflected onto the news server at + news://news.php.net/. The + server also has a read only web interface at + http://news.php.net/. + +
+ ++ Mailing list messages are transfered to newsgroup posts and + newsgroup posts are sent to the mailing lists. Please note + that these newsgroups are only available on this server. +
+ ++ Christopher R. Moewes-Bystrom is running a PHP user group registry at http://www.phpusergroups.org/. + There's also a list of user groups in Germany, as well as news from them, + and link to other countries user groups at + http://www.phpug.de/. + PHP Meetup is another great + opportunity to get together. + +
+ ++ A list of upcoming events (such as user group meetings and PHP training + sessions) is included in the right-hand column of the front page, and + on the event calendar page. If you want to list + an upcoming event, just fill out the form on this page. +
+ ++ Looking for some more sample PHP scripts? Our links page lists some archives of sample PHP code - + great places to find many example scripts and useful functions, organized for + your searching pleasure! +
+ ++ Otherwise known as IRC or Internet Relay Chat. Here you can usually find + experienced PHP people sitting around doing nothing on various channels with + php in their names. Note that there is no official IRC channel. + Check OFTC or any other major network + (EFNet, + IRCNet, + QuakeNet, + DALNet and + freenode). + +
+ ++ If you have a problem or suggestion in connection with the PHP.net + website or mirror sites, please + contact the webmasters. If you have problems setting up PHP + or using some functionality, please ask your question on a support + channel detailed above, the webmasters will not answer any such + questions. +
++ Notepad++: + Assuming you've put the manual into "C:\Program Files\PhpManual" you have to + find the file named "shortcuts.xml" in Notepad++'s folder, open it in a + text editor and add this line to the UserDefinedCommands section + (line breaks added for clarity - should be on a single line): +
++ <Command name="PHP Manual" Ctrl="yes" Alt="yes" Shift="no" Key="116"> + hh.exe "ms-its:c:/Program Files/Phpmanual/php_manual_en.chm::/function.$(CURRENT_WORD).html" + </Command> ++
+ Usage: highlight a PHP function name and either press ALT+CTRL+F5 or click the PHP Manual + item under the Run menu and the CHM will open at the function's page. +
+The PHP FAQ is your first stop for general - information and those questions that seem to be on most people\'s minds. + information and those questions that seem to be on most people's minds. If you have licensing questions, see the separate License FAQ.
@@ -37,10 +41,11 @@ great places to find many example scripts and useful functions, organized for your searching pleasure! -'; -site_header("Documentation"); +$newsdate
+Last updated: ' .$PGI['lastmod']. '
'; + } // Print out manual page footer @@ -83,10 +88,13 @@ function manual_footer() // Get vars for easy handling list($filename, $title) = $PGI['this']; - echo "PHP @@ -62,10 +112,7 @@ and the example archive sites and some of the other resources available in the links section.
-- Ever wondered how popular PHP is? see the - Netcraft Survey. -
+You can grab our news as an Atom feed. -
'; + + +News Archive'; + +column(); +// }}} + +// Right column (releases/events..) {{{ +column_box(COLUMN_RIGHT, true, array("classes" => array("block" => array("releases")))); $MIRROR_IMAGE = ''; -// Try to find a sponsor image in case this is an official mirror +// Try to find a sponsor image in case this is an official mirror {{{ if (is_official_mirror()) { // Iterate through possible mirror provider logo types in priority order @@ -141,117 +194,70 @@ break; } } -} - -/* {{{ Generate latest release info */ -/* NOTE: You are editing the wrong file, you should be in include/version.inc - * For RC: See the $PHP_x_RC variable - * For STABLE: See the $PHP_x_VERSION/_DATE/_MD5 variables - */ -$PHP_5_STABLE = $PHP_4_STABLE = array(); -$PHP_5_RC = $PHP_4_RC = ""; -$rel = $rc = ""; +} // }}} +// {{{ Generate latest release info list($PHP_5_STABLE, ) = each($RELEASES[5]); -list($PHP_4_STABLE, ) = each($RELEASES[4]); - -$rel = <<< EOT -Historical PHP Stable: 4.4.9
+ ++ + +
+We suggest you visit our support page @@ -16,8 +19,10 @@ list of software available under the PHP license.
-'; -site_header("Links"); + +- Change the DocumentRoot and include_path settings as appropriate, + Change the DocumentRoot setting as appropriate, specify the mirror's preferred language, and provide settings according to your stats setup, if your mirror is going to provide it. For the preferred language setting, choose one from those available as diff --git a/my.php b/my.php index f268466d70..1a579326b0 100644 --- a/my.php +++ b/my.php @@ -1,7 +1,7 @@
In an effort to make security related information more readily available, the PHP Security Response Team created a new Security Center on March 1st, 2007. The Security Center will serve as the central location where interested parties can find information about security threats, fixes and/or workarounds and any other related meterial.
- -";print_r($RECORDS); - $id = isset($_GET["id"]) ? (int)$_GET["id"] : 0; - if(!$id || !isset($RECORDS[$id])) { -?> -PHP Vulnerability Disclosures
-This page contains information about PHP-related security threats, patches and known workarounds.
-If you believe you have discovered a security problem in PHP please inform the
-
PHP Security Response Team in confidence by mailing security@php.net
-The following colors are used to highlight the severity of a bug:
-
It might also be a good idea to dig deeper into @@ -17,8 +20,10 @@ Our links page offers some start pages you will find interesting.
-'; -site_header("A Tourist's Guide"); + +- A good place to start is by skimming through the ever-growing list of frequently asked questions (with answers, of course). Then - have a look at the rest of the online manual and other resources in the documentation section. + A good place to start is by skimming through the ever-growing list of + frequently asked questions (with answers, of course). + Then have a look at the rest of the online manual and other resources in the + documentation section.
-Books are convenient resources to begin exploring or extend your PHP knowledge. There are literally thousands of books available in @@ -27,7 +29,7 @@ and search there.
-There are a number of mailing lists devoted to talking about PHP and related @@ -36,7 +38,7 @@ subscribe to the lists.
-The PHP language newsgroup is comp.lang.php, available on any @@ -53,7 +55,7 @@ that these newsgroups are only available on this server.
-
Christopher R. Moewes-Bystrom is running a PHP user group registry at
-
A list of upcoming events (such as user group meetings and PHP training
@@ -75,7 +77,7 @@
href="/submit-event.php">on this pageEvents & Training
+Events & Training
Looking for some more sample PHP scripts? Our
-
Otherwise known as IRC or Internet Relay Chat. Here you can usually find
@@ -107,7 +109,7 @@
freenode).
If you have a problem or suggestion in connection with the PHP.net
@@ -118,4 +120,8 @@
questions.
Instant Resource Center
+Instant Resource Center
PHP.net webmasters
+PHP.net webmasters