Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Zend/bench.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@

function simple() {
$a = 0;
for ($i = 0; $i < 1000000; $i++)
for ($i = 0; $i < 1000000; $i++)
$a++;

$thisisanotherlongname = 0;
for ($thisisalongname = 0; $thisisalongname < 1000000; $thisisalongname++)
for ($thisisalongname = 0; $thisisalongname < 1000000; $thisisalongname++)
$thisisanotherlongname++;
}

/****/

function simplecall() {
for ($i = 0; $i < 1000000; $i++)
for ($i = 0; $i < 1000000; $i++)
strlen("hallo");
}

Expand All @@ -26,14 +26,14 @@ function hallo($a) {
}

function simpleucall() {
for ($i = 0; $i < 1000000; $i++)
for ($i = 0; $i < 1000000; $i++)
hallo("hallo");
}

/****/

function simpleudcall() {
for ($i = 0; $i < 1000000; $i++)
for ($i = 0; $i < 1000000; $i++)
hallo2("hallo");
}

Expand Down
6 changes: 3 additions & 3 deletions Zend/micro_bench.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ function hallo() {
}

function simpleucall($n) {
for ($i = 0; $i < $n; $i++)
for ($i = 0; $i < $n; $i++)
hallo();
}

function simpleudcall($n) {
for ($i = 0; $i < $n; $i++)
for ($i = 0; $i < $n; $i++)
hallo2();
}

function hallo2() {
}

function simpleicall($n) {
for ($i = 0; $i < $n; $i++)
for ($i = 0; $i < $n; $i++)
func_num_args();
}

Expand Down
14 changes: 7 additions & 7 deletions Zend/zend_vm_gen.php
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ function gen_labels($f, $spec, $kind, $prolog, &$specs, $switch_labels = array()
$label++;
return;
}

// Emit pointer to specialized handler
$spec_name = $dsc["op"]."_SPEC".$prefix[$op1].$prefix[$op2].extra_spec_name($extra_spec);
switch ($kind) {
Expand Down Expand Up @@ -1942,7 +1942,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
"# endif\n" .
$m[1]."return;\n" .
"#else\n" .
$m[1]."if (EXPECTED(ret > 0)) {\n" .
$m[1]."if (EXPECTED(ret > 0)) {\n" .
$m[1]."\texecute_data = EG(current_execute_data);\n".
$m[1]."\tZEND_VM_LOOP_INTERRUPT_CHECK();\n".
$m[1]."} else {\n" .
Expand Down Expand Up @@ -2351,7 +2351,7 @@ function gen_vm($def, $skel) {
fputs($f, "ZEND_API const char* ZEND_FASTCALL zend_get_opcode_name(zend_uchar opcode);\n");
fputs($f, "ZEND_API uint32_t ZEND_FASTCALL zend_get_opcode_flags(zend_uchar opcode);\n\n");
fputs($f, "END_EXTERN_C()\n\n");

foreach ($opcodes as $code => $dsc) {
$code = str_pad((string)$code,$code_len," ",STR_PAD_LEFT);
$op = str_pad($dsc["op"],$max_opcode_len);
Expand All @@ -2375,13 +2375,13 @@ function gen_vm($def, $skel) {
out($f, HEADER_TEXT);
fputs($f,"#include <stdio.h>\n");
fputs($f,"#include <zend.h>\n\n");

fputs($f,"static const char *zend_vm_opcodes_names[".($max_opcode + 1)."] = {\n");
for ($i = 0; $i <= $max_opcode; $i++) {
fputs($f,"\t".(isset($opcodes[$i]["op"])?'"'.$opcodes[$i]["op"].'"':"NULL").",\n");
}
fputs($f, "};\n\n");

fputs($f,"static uint32_t zend_vm_opcodes_flags[".($max_opcode + 1)."] = {\n");
for ($i = 0; $i <= $max_opcode; $i++) {
fprintf($f, "\t0x%08x,\n", isset($opcodes[$i]["flags"]) ? $opcodes[$i]["flags"] : 0);
Expand All @@ -2395,7 +2395,7 @@ function gen_vm($def, $skel) {
fputs($f, "ZEND_API uint32_t ZEND_FASTCALL zend_get_opcode_flags(zend_uchar opcode) {\n");
fputs($f, "\treturn zend_vm_opcodes_flags[opcode];\n");
fputs($f, "}\n");

fclose($f);
echo "zend_vm_opcodes.c generated successfully.\n";

Expand Down Expand Up @@ -2426,7 +2426,7 @@ function gen_vm($def, $skel) {
out($f, "# pragma warning(once : 6326)\n");
}
out($f, "#endif\n");

// Support for ZEND_USER_OPCODE
out($f, "static user_opcode_handler_t zend_user_opcode_handlers[256] = {\n");
for ($i = 0; $i < 255; ++$i) {
Expand Down
2 changes: 1 addition & 1 deletion ext/curl/tests/responder/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
echo $_COOKIE['foo'];
break;
case 'encoding':
echo $_SERVER['HTTP_ACCEPT_ENCODING'];
echo $_SERVER['HTTP_ACCEPT_ENCODING'];
break;
case 'contenttype':
header('Content-Type: text/plain;charset=utf-8');
Expand Down
4 changes: 2 additions & 2 deletions ext/dom/tests/domdocumentload_utilities.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

function libxml_options_to_int($libxmlOptions) {

$defined_constants = get_defined_constants(true);
$env_array = explode('|', $libxmlOptions);
$libxml_constants = array_intersect_key($defined_constants['libxml'], array_flip($env_array));

$sum = 0;
foreach($libxml_constants as $value) {
foreach($libxml_constants as $value) {
$sum = $sum|$value;
}

Expand Down
2 changes: 1 addition & 1 deletion ext/dom/tests/domdocumentloadxml_test_method.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$doc = new DOMDocument();

$libxml_options = libxml_options_to_int(getenv('LOAD_OPTIONS'));
$result = $doc->loadXML(file_get_contents(dirname(__FILE__) . getenv('XML_FILE')),
$result = $doc->loadXML(file_get_contents(dirname(__FILE__) . getenv('XML_FILE')),
$libxml_options);

$expectedResult = (bool) getenv('EXPECTED_RESULT');
Expand Down
2 changes: 1 addition & 1 deletion ext/dom/tests/domdocumentloadxml_test_method_savexml.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$doc = new DOMDocument();

$libxml_options = libxml_options_to_int(getenv('LOAD_OPTIONS'));
$result = $doc->loadXML(file_get_contents(dirname(__FILE__) . getenv('XML_FILE')),
$result = $doc->loadXML(file_get_contents(dirname(__FILE__) . getenv('XML_FILE')),
$libxml_options);

$expectedResult = (bool) getenv('EXPECTED_RESULT');
Expand Down
16 changes: 8 additions & 8 deletions ext/ext_skel.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ function print_success() {
*/
function process_args($argv, $argc) {
$options = [
'unix' => true,
'windows' => true,
'ext' => '',
'dir' => __DIR__ . DIRECTORY_SEPARATOR,
'skel' => __DIR__ . DIRECTORY_SEPARATOR . 'skeleton' . DIRECTORY_SEPARATOR,
'author' => false,
'experimental' => false,
'unix' => true,
'windows' => true,
'ext' => '',
'dir' => __DIR__ . DIRECTORY_SEPARATOR,
'skel' => __DIR__ . DIRECTORY_SEPARATOR . 'skeleton' . DIRECTORY_SEPARATOR,
'author' => false,
'experimental' => false,
'std' => false
];

Expand Down Expand Up @@ -271,7 +271,7 @@ function copy_sources() {
global $options;

$files = [
'skeleton.c' => $options['ext'] . '.c',
'skeleton.c' => $options['ext'] . '.c',
'php_skeleton.h' => 'php_' . $options['ext'] . '.h'
];

Expand Down
2 changes: 1 addition & 1 deletion ext/hash/bench.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/*
This gives rather interesting results :)

Measures on a Notebook P4M-1.7 256MB Windows 2000:
sha1 0.556691
tiger160,3 0.774469
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/doc/collator_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ function collator_sort_with_sort_keys( $coll, $arr ) {}
* Get the locale name of the collator.
*
* @param Collator $coll Collator object.
* @param int $type You can choose between valid and
* @param int $type You can choose between valid and
* actual locale
* (ULOC_VALID_LOCALE, ULOC_ACTUAL_LOCALE
* respectively).
Expand Down
Loading