id
stringlengths
6
6
text
stringlengths
20
17.2k
title
stringclasses
1 value
196007
<?php namespace Illuminate\Session\Middleware; use Closure; use Illuminate\Auth\AuthenticationException; use Illuminate\Contracts\Auth\Factory as AuthFactory; use Illuminate\Contracts\Session\Middleware\AuthenticatesSessions; use Illuminate\Http\Request; class AuthenticateSession implements AuthenticatesSessions { ...
196009
<?php namespace Illuminate\Session\Console; use Illuminate\Console\MigrationGeneratorCommand; use Symfony\Component\Console\Attribute\AsCommand; use function Illuminate\Filesystem\join_paths; #[AsCommand(name: 'make:session-table', aliases: ['session:table'])] class SessionTableCommand extends MigrationGeneratorCom...
196021
[PHP] ;;;;;;;;;;;;;;;;;;; ; About php.ini ; ;;;;;;;;;;;;;;;;;;; ; PHP's initialization file, generally called php.ini, is responsible for ; configuring many of the aspects of PHP's behavior. ; PHP attempts to find and load this configuration from a number of locations. ; The following is a summary of its search ord...
196032
[PHP] ;;;;;;;;;;;;;;;;;;; ; About php.ini ; ;;;;;;;;;;;;;;;;;;; ; PHP's initialization file, generally called php.ini, is responsible for ; configuring many of the aspects of PHP's behavior. ; PHP attempts to find and load this configuration from a number of locations. ; The following is a summary of its search ord...
196589
#if defined(IEEE_8087) + defined(IEEE_MC68k) + defined(VAX) + defined(IBM) != 1 Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined. #endif typedef union { double d; ULong L[2]; } U; #ifdef IEEE_8087 #define word0(x) (x)->L[1] #define word1(x) (x)->L[0] #else #define word0(x) (x)->L[0] #define word1(x...
197058
--TEST-- Bug #54367 (Use of closure causes problem in ArrayAccess) --FILE-- <?php class MyObject implements ArrayAccess { public function offsetSet($offset, $value): void { } public function offsetExists($offset): bool { } public function offsetUnset($offset): void { } public function offsetGet($offse...
197311
--TEST-- Bug #43483 (get_class_methods() does not list all visible methods) --FILE-- <?php class C { public static function test() { D::prot(); print_r(get_class_methods("D")); } } class D extends C { protected static function prot() { echo "Successfully called D::prot().\n"; } }...
197850
--TEST-- File with just a <?php tag should be valid --FILE_EXTERNAL-- php_tag_only.inc --EXPECT--
199219
--TEST-- Using traits to implement interface --FILE-- <?php trait foo { public function abc() { } } interface baz { public function abc(); } class bar implements baz { use foo; } new bar; print "OK\n"; ?> --EXPECT-- OK
199240
--TEST-- Bug #55137 (Changing trait static method visibility) --FILE-- <?php trait A { protected static function foo() { echo "abc\n"; } private static function bar() { echo "def\n"; } } class B { use A { A::foo as public; A::bar as public baz; } } B::foo(); B::baz(); ?> --EXPECT-- abc def
199256
--TEST-- Bug #76773 (Traits used on the parent are ignored for child classes) --FILE-- <?php trait MyTrait { public function hello() { echo __CLASS__, "\n"; if (get_parent_class(__CLASS__) !== false) { parent::hello(); } } } class ParentClass { use MyTrait; } clas...
199304
--TEST-- Checking error message when the trait doesn't implements the interface --FILE-- <?php trait foo { public function a() { } } interface baz { public function abc(); } class bar implements baz { use foo; } new bar; ?> --EXPECTF-- Fatal error: Class bar contains 1 abstract method and must the...
199328
--TEST-- Abstract Trait Methods should behave like common abstract methods and implementation may be provided by other traits. Sorting order shouldn't influence result. --FILE-- <?php error_reporting(E_ALL); trait THello { public abstract function hello(); } trait THelloImpl { public function hello() { echo '...
200231
--TEST-- 002: Import - different syntaxes --FILE-- <?php namespace test\ns1; class Foo { static function bar() { echo __CLASS__,"\n"; } } class Foo2 { static function bar() { echo __CLASS__,"\n"; } } namespace xyz; use test\ns1\Foo; use test\ns1\Foo as Bar; use \test\ns1\Foo2; use \test\ns1\Foo2 as B...
200250
--TEST-- 065: Multiple names in use statement --FILE-- <?php use X\Y as test, X\Z as test2; require "ns_065.inc"; test\foo(); test2\foo(); ?> --EXPECT-- X\Y\foo X\Z\foo
200504
--TEST-- #[\Override]: On used trait with interface method. --FILE-- <?php trait T { #[\Override] public function i(): void {} } interface I { public function i(): void; } class Foo implements I { use T; } echo "Done"; ?> --EXPECT-- Done
200507
--TEST-- #[\Override]: Redeclared trait method with interface. --FILE-- <?php interface I { public function i(): string; } trait T { public function i(): string { return 'T'; } } class C implements I { use T; #[\Override] public function i(): string { return 'C'; } } var...
200511
--TEST-- #[Override] attribute in trait does not check for parent class implementations --FILE-- <?php class A { public function foo(): void {} } interface I { public function foo(): void; } trait T { #[\Override] public function foo(): void { echo 'foo'; } } // Works fine class B implem...
200518
--TEST-- #[Override] attribute in trait does not check for parent class implementations (Variant with abstract __construct) --FILE-- <?php abstract class A { abstract public function __construct(); } trait T { #[\Override] public function __construct() { echo 'foo'; } } class D extends A { ...
200526
--TEST-- #[Override] attribute in trait does not check for parent class implementations (Variant with protected parent method) --FILE-- <?php class A { protected function foo(): void {} } trait T { #[\Override] public function foo(): void { echo 'foo'; } } class D extends A { use T; } ech...
201729
--TEST-- Closure 002: Lambda with lexical variables (global scope) --FILE-- <?php $x = 4; $lambda1 = function () use ($x) { echo "$x\n"; }; $lambda2 = function () use (&$x) { echo "$x\n"; }; $lambda1(); $lambda2(); $x++; $lambda1(); $lambda2(); echo "Done\n"; ?> --EXPECT-- 4 4 4 5 Done
201747
--TEST-- Closure 012: Undefined lexical variables --FILE-- <?php $lambda = function () use ($i) { return ++$i; }; $lambda(); $lambda(); var_dump($i); $lambda = function () use (&$i) { return ++$i; }; $lambda(); $lambda(); var_dump($i); ?> --EXPECTF-- Warning: Undefined variable $i in %s on line %d Warning: Und...
201824
--TEST-- aliasing imported functions to resolve naming conflicts --FILE-- <?php namespace foo { function baz() { return 'foo.baz'; } } namespace bar { function baz() { return 'bar.baz'; } } namespace { use function foo\baz as foo_baz, bar\baz as bar_baz; var_d...
206812
--TEST-- Inline HTML should not be split at partial PHP tags --EXTENSIONS-- tokenizer --INI-- short_open_tag=0 --FILE-- <?php var_dump(token_get_all(<<<'PHP' Foo<?phpBar PHP)); ?> --EXPECTF-- array(1) { [0]=> array(3) { [0]=> int(%d) [1]=> string(11) "Foo<?phpBar" [2]=> int(1) } }
210580
--TEST-- Test is_array() function --FILE-- <?php echo "*** Testing is_array() on different type of arrays ***\n"; /* different types of arrays */ $arrays = array( array(), array(NULL), array(null), array(true), array(""), array(''), array(array(), array()), array(array(1, 2), array('a', 'b')), array(1...
210672
--TEST-- Test array_is_list() function --FILE-- <?php function test_is_list(string $desc, $val) : void { try { printf("%s: %s\n", $desc, json_encode(array_is_list($val))); } catch (TypeError $e) { printf("%s: threw %s\n", $desc, $e->getMessage()); } } test_is_list("empty", []); test_is_lis...
213274
--TEST-- Test array_keys() function (variation - 3) --FILE-- <?php echo "*** Testing array_keys() on all the types other than arrays ***\n"; $types_arr = array( TRUE => TRUE, FALSE => FALSE, 1 => 1, 0 => 0, -1 => -1, "1" => "1", "0" => "0", "-1" => "-1", NULL, array(), "php" => "php", "" => "" ...
213540
--TEST-- Test array_filter() function : usage variations - Different types of array for 'input' argument --FILE-- <?php /* * Passing different types of array as 'input' argument. */ function always_false($input) { return false; } // callback function returning always true function always_true($input) { return tru...
213640
--TEST-- Test array_intersect() function : usage variations - different arrays for 'arr1' argument --FILE-- <?php /* * Passing different types of arrays to $arr1 argument and testing whether * array_intersect() behaves in expected way with the other arguments passed to the function * The $arr2 argument is a fixed array...
214781
Warning: PDOStatement::execute(): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'some_bool_2' cannot be null in %s array(3) { [0]=> string(5) "23000" [1]=> int(1048) [2]=> string(35) "Column 'some_bool_2' cannot be null" } Array ( [uid] => 6 [0] => 6 [some_bool_1] => 0 [1] => ...
214823
--TEST-- Error during closeCursor() of multi query --EXTENSIONS-- pdo_mysql --SKIPIF-- <?php require_once __DIR__ . '/inc/mysql_pdo_test.inc'; MySQLPDOTest::skip(); ?> --FILE-- <?php require_once __DIR__ . '/inc/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); $...
215358
PHP_FUNCTION(json_decode) { char *str; size_t str_len; bool assoc = 0; /* return JS objects as PHP objects by default */ bool assoc_null = 1; zend_long depth = PHP_JSON_PARSER_DEFAULT_DEPTH; zend_long options = 0; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STRING(str, str_len) Z_PARAM_OPTIONAL Z_PARAM_BOOL...
215383
--TEST-- JSON (http://www.crockford.com/JSON/JSON_checker/test/pass3.json) --FILE-- <?php $test = ' { "JSON Test Pattern pass3": { "The outermost value": "must be an object or array.", "In this test": "It is an object." } } '; echo 'Testing:' . $test . "\n"; echo "DECODE: AS OBJECT\n"; $obj = ...
215392
--TEST-- JSON (http://www.crockford.com/JSON/JSON_checker/test/pass2.json) --FILE-- <?php $test = '[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]]'; echo 'Testing: ' . $test . "\n"; echo "DECODE: AS OBJECT\n"; $obj = json_decode($test); var_dump($obj); echo "DECODE: AS ARRAY\n"; $arr = json_decode($test, true); v...
215453
--TEST-- JSON (http://www.crockford.com/JSON/JSON_checker/test/pass1.json) --INI-- serialize_precision=-1 --FILE-- <?php $test = " [ \"JSON Test Pattern pass1\", {\"object with 1 member\":[\"array with 1 element\"]}, {}, [], -42, true, false, null, { \"integer\": 1234567890,...
220681
/* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is ...
220710
/* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is ...
220726
PHP_ARG_WITH([sodium], [for sodium support], [AS_HELP_STRING([--with-sodium], [Include sodium support])]) if test "$PHP_SODIUM" != "no"; then PKG_CHECK_MODULES([LIBSODIUM], [libsodium >= 1.0.8]) PHP_EVAL_INCLINE([$LIBSODIUM_CFLAGS]) PHP_EVAL_LIBLINE([$LIBSODIUM_LIBS], [SODIUM_SHARED_LIBADD]) AC_DEFIN...
220741
--TEST-- Check for sodium presence --EXTENSIONS-- sodium --FILE-- <?php echo "sodium extension is available"; /* you can add regression tests for your extension here the output of your test code has to be equal to the text in the--EXPECT-- section below for the tests to pass, differences between the outp...
222166
--TEST-- PDO_DBLIB: Uniqueidentifier column data type stringifying --EXTENSIONS-- pdo_dblib --SKIPIF-- <?php require __DIR__ . '/config.inc'; $db = getDbConnection(); if (in_array($db->getAttribute(PDO::DBLIB_ATTR_TDS_VERSION), ['4.2', '4.6'])) die('skip feature unsupported by this TDS version'); ?> --FILE-- <?php requ...
225566
--TEST-- rfc1867 empty upload --INI-- file_uploads=1 upload_max_filesize=1024 max_file_uploads=10 --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="foo" ----...
225783
--TEST-- short_open_tag: Off --INI-- short_open_tag=off --FILE-- <%= 'so should this' %> <?php $a = 'This gets echoed twice'; ?> <?= $a?> <%= $a%> <? $b=3; ?> <?php echo "{$b}"; ?> <?= "{$b}"?> --EXPECTF-- <%= 'so should this' %> This gets echoed twice <%= $a%> <? $b=3; ?> Warning: Undefined variable $b in...
225826
--TEST-- short_open_tag: Off --INI-- short_open_tag=off --FILE-- <? echo "Used a short tag\n"; ?> Finished --EXPECT-- <? echo "Used a short tag\n"; ?> Finished
226174
/** @return DocCommentTag[] */ function parseDocComments(array $comments): array { $tags = []; foreach ($comments as $comment) { if ($comment instanceof DocComment) { $tags = array_merge($tags, parseDocComment($comment)); } } return $tags; } /** @return DocCommentTag[] */ f...
226762
--TEST-- Post a file --SKIPIF-- <?php include "skipif.inc"; ?> --FILE-- <?php include "php_cli_server.inc"; php_cli_server_start('var_dump($_FILES);'); $host = PHP_CLI_SERVER_HOSTNAME; $fp = php_cli_server_connect(); $post_data = <<<POST -----------------------------114782935826962 Content-Disposition: form-data; nam...
227378
"psr-4": { "Intervention\\Image\\": "src/Intervention/Image" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Oliv...
227379
"filp/whoops": "Required for friendly error pages in development (^2.14.3).", "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.5).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3...
227412
"openai-php/client": "Require get solutions from OpenAI", "simple-cache-implementation": "To cache solutions from OpenAI" }, "type": "library", "extra": { "branch-alias": { "dev-main": "1.5.x-dev" } }, ...
227414
<?php /** * Laravel - A PHP Framework For Web Artisans * * @package Laravel * @author Taylor Otwell <taylor@laravel.com> */ $uri = urldecode( parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ); // This file allows us to emulate Apache's "mod_rewrite" functionality from the // built-in PHP web server. Thi...
227417
#!/usr/bin/env php <?php define('LARAVEL_START', microtime(true)); /* |-------------------------------------------------------------------------- | Register The Auto Loader |-------------------------------------------------------------------------- | | Composer provides a convenient, automatically generated class loa...
227419
<?php /* |-------------------------------------------------------------------------- | Create The Application |-------------------------------------------------------------------------- | | The first thing we will do is create a new Laravel application instance | which serves as the "glue" for all the components of La...
227426
<?php namespace App\Providers; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Illuminate\Support\Facades\Gate; class AuthServiceProvider extends ServiceProvider { /** * The policy mappings for the application. * * @var array */ protected $policies ...
227430
<?php namespace App\Http; use Illuminate\Foundation\Http\Kernel as HttpKernel; class Kernel extends HttpKernel { /** * The application's global HTTP middleware stack. * * These middleware are run during every request to your application. * * @var array */ protected $middleware =...
227431
<?php namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; class VerifyCsrfToken extends Middleware { /** * The URIs that should be excluded from CSRF verification. * * @var array */ protected $except = [ // ]; }
227432
<?php namespace App\Http\Middleware; use App\Providers\RouteServiceProvider; use Closure; use Illuminate\Support\Facades\Auth; class RedirectIfAuthenticated { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|null ...
227434
<?php namespace App\Http\Middleware; use Illuminate\Auth\Middleware\Authenticate as Middleware; class Authenticate extends Middleware { /** * Get the path the user should be redirected to when they are not authenticated. * * @param \Illuminate\Http\Request $request * @return string|null ...
227436
<?php namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware; class CheckForMaintenanceMode extends Middleware { /** * The URIs that should be reachable while maintenance mode is enabled. * * @var array */ protected $except = [ ...
227437
<?php namespace App\Http\Middleware; use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; class EncryptCookies extends Middleware { /** * The names of the cookies that should not be encrypted. * * @var array */ protected $except = [ // ]; }
227438
<?php namespace App\Http\Controllers; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Routing\Controller as BaseController; class Controller extends BaseController { use AuthorizesReques...
227442
#!/bin/bash if [ ! -f composer.json ]; then echo "Please make sure to run this script from the root directory of this repo." exit 1 fi composer install cp .env.example .env php artisan key:generate source "$(dirname "$0")/checkout_latest_docs.sh" npm install npm run build
227444
#!/bin/bash if [ ! -f composer.json ]; then echo "Please make sure to run this script from the root directory of this repo." exit 1 fi composer install source "$(dirname "$0")/checkout_latest_docs.sh" npm install npm run build
227448
<?php use Illuminate\Support\Facades\Facade; return [ /* |-------------------------------------------------------------------------- | Application Name |-------------------------------------------------------------------------- | | This value is the name of your application. This value is use...
227451
<?php use Illuminate\Support\Str; return [ /* |-------------------------------------------------------------------------- | Default Database Connection Name |-------------------------------------------------------------------------- | | Here you may specify which of the database connections b...
227453
<?php use Illuminate\Support\Str; return [ /* |-------------------------------------------------------------------------- | Default Session Driver |-------------------------------------------------------------------------- | | This option controls the default session "driver" that will be use...
227454
<?php return [ /* |-------------------------------------------------------------------------- | Default Queue Connection Name |-------------------------------------------------------------------------- | | Laravel's queue API supports an assortment of back-ends via a single | API, giving y...
227458
<?php use Monolog\Handler\NullHandler; use Monolog\Handler\StreamHandler; use Monolog\Handler\SyslogUdpHandler; return [ /* |-------------------------------------------------------------------------- | Default Log Channel |-------------------------------------------------------------------------- ...
227459
<?php return [ /* |-------------------------------------------------------------------------- | Default Filesystem Disk |-------------------------------------------------------------------------- | | Here you may specify the default filesystem disk that should be used | by the framework. T...
227462
.docs_main { /* Headers */ & h1, & h2, & h3, & h4, & h5, & h6, & h4 a, & h3 a, & h2 a { @apply dark:text-gray-200; } /* Body text */ & p, & ul:not(:first-of-type) li, & .content-list ul li, & #software-list, & #valet-support { @apply dark:text-gray-400; } /* Table of conten...
227464
@import 'tailwindcss/base'; @import 'tailwindcss/components'; @import "./_typography.css"; @import "./_code.css"; @import "./_sidebar_layout.css"; @import "./_search.css"; @import "./_docs.css"; @import "./_carbon_ads.css"; @import "./_accessibility.css"; @import 'tailwindcss/utilities'; @import "./_dark_mode.css";...
227486
<?php return [ /* |-------------------------------------------------------------------------- | Validation Language Lines |-------------------------------------------------------------------------- | | The following language lines contain the default error messages used by | the validator ...
227517
<header class="lg:hidden" @keydown.window.escape="navIsOpen = false" @click.away="navIsOpen = false" > <div class="relative mx-auto w-full py-10 bg-white transition duration-200 dark:bg-dark-700"> <div class="mx-auto px-8 sm...
227597
<div id="main-content"> {{ $slot }} </div>
227598
<header x-trap.inert.noscroll="navIsOpen" class="main-header relative z-50 text-gray-700" @keydown.window.escape="navIsOpen = false" @click.away="navIsOpen = false" > <x-header-news-bar /> <div class="relative max-w-screen-2xl mx-auto w-full py-4 bg-white transition duration-200 lg:bg-transpare...
227601
<x-tabs> <x-tabs.tab name="authentication" title="Authentication" icon="lock-closed"> <p>Authenticating users is as simple as adding an authentication middleware to your Laravel route definition:</p> <pre><x-torchlight-code language="php"> Route::get('/profile', ProfileController::class...
227604
<?php /** * Laravel - A PHP Framework For Web Artisans * * @package Laravel * @author Taylor Otwell <taylor@laravel.com> */ define('LARAVEL_START', microtime(true)); if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) { require __DIR__.'/../storage/framework/maintenance.php'; } /* |-------...
227902
<?php use Illuminate\Foundation\Inspiring; /* |-------------------------------------------------------------------------- | Console Routes |-------------------------------------------------------------------------- | | This file is where you may define all of your Closure based console | commands. Each Closure is bou...
230086
<p>to any links on a page where the user's email address is known, you may propagate it to the next page. The PHP logging system will automatically look for this variable and record its value as the user's e-mail address in the logs. For any users of PHP1, the above serves the same function as adding <em>?&lt...
230091
<p>Also inherent to the language is the fact that the type of the variable determines how certain basic operations will be carried out. For example:</p> <pre> $a = $b + $c; </pre> <p>can do a couple of different things. If $b is a number, the numerical value of $c is added to $b and the sum is stored in ...
230238
<orderedlist> <listitem> <para> Obtain the Apache HTTP server from the location listed above, and unpack it: </para> <informalexample> <screen> <![CDATA[ tar -xzf httpd-2.x.NN.tar.gz ]]> </screen> </informalexample> </listitem> <listitem> <para> Likewise, obtain and unpack the...
230366
<sect1 xml:id="features.file-upload.post-method"> <title>POST method uploads</title> <simpara> This feature lets people upload both text and binary files. With PHP's authentication and file manipulation functions, you have full control over who is allowed to upload and what is to be done with the...
230380
<sect1 xml:id="functions.anonymous"> <title>Anonymous functions</title> <simpara> Anonymous functions, also known as <literal>closures</literal>, allow the creation of functions which have no specified name. They are most useful as the value of <type>callable</type> parameters, but they have many...
230381
<sect2 role="changelog"> &reftitle.changelog; <para> <informaltable> <tgroup cols="2"> <thead> <row> <entry>&Version;</entry> <entry>&Description;</entry> </row> </thead> <tbody> <row> <entry>7.1.0</entry> <entry> ...
230384
<title>Basic syntax</title> <sect1 xml:id="language.basic-syntax.phptags"> <title>PHP tags</title> <para> When PHP parses a file, it looks for opening and closing tags, which are <literal>&lt;?php</literal> and <literal>?&gt;</literal> which tell PHP to start and stop interpreting the code between t...
230388
<sect1 xml:id="language.generators.syntax"> <title>Generator syntax</title> <para> A generator function looks just like a normal function, except that instead of returning a value, a generator &yield;s as many values as it needs to. Any function containing &yield; is a generator function. </para> <pa...
230418
<sect1 xml:id="language.namespaces.importing"> <title>Using namespaces: Aliasing/Importing</title> <titleabbrev>Aliasing and Importing</titleabbrev> <?phpdoc print-version-for="namespaces"?> <para> The ability to refer to an external fully qualified name with an alias, or importing, is an important featur...
230480
<sect2 xml:id="language.types.array.syntax"> <title>Syntax</title> <sect3 xml:id="language.types.array.syntax.array-func"> <title>Specifying with <function>array</function></title> <para> An <type>array</type> can be created using the <function>array</function> language construct. It takes any num...
230482
<sect3 xml:id="language.types.array.syntax.modifying"> <title>Creating/modifying with square bracket syntax</title> <para> An existing <type>array</type> can be modified by explicitly setting values in it. </para> <para> This is done by assigning values to the <type>array</type>, specifying th...
230527
<?xml version="1.0" encoding="utf-8"?> <sect1 xml:id="language.operators.array"> <title>Array Operators</title> <titleabbrev>Array</titleabbrev> <table> <title>Array Operators</title> <tgroup cols="3"> <thead> <row> <entry>Example</entry> <entry>Name</entry> <entry>Result</entry> </row>...
230555
<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <sect1 xml:id="language.oop5.traits" xmlns="http://docbook.org/ns/docbook"> <title>Traits</title> <para> PHP implements a way to reuse code called Traits. </para> <para> Traits are a mechanism for code reuse in single inheritance languages such a...
230556
<sect2 xml:id="language.oop5.traits.abstract"> <title>Abstract Trait Members</title> <para> Traits support the use of abstract methods in order to impose requirements upon the exhibiting class. Public, protected, and private methods are supported. Prior to PHP 8.0.0, only public and protected abstract...
230665
<?xml version="1.0" encoding="utf-8"?> <reference xml:id="class.deprecated" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>The Deprecated attribute</title> <titleabbrev>Deprecated</titleabbrev> <partintro> <section ...
230752
<para> <variablelist> <varlistentry xml:id="ini.short-open-tag"> <term> <parameter>short_open_tag</parameter> <type>bool</type> </term> <listitem> <para> Tells PHP whether the short form (<userinput>&lt;? ?&gt;</userinput>) of PHP's open tag should be allo...
232889
<refentry xml:id="function.simdjson-decode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>simdjson_decode</refname> <refpurpose>Decodes a JSON string</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> ...
234373
<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xml:id="function.array" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>array</refname> <refpurpose>Create an array</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>array...
234433
<?xml version="1.0" encoding="utf-8"?> <refentry xml:id="function.array-is-list" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>array_is_list</refname> <refpurpose>Checks whether a given <parameter>array</parameter> is a list</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.de...
236194
<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.mkdir"> <refnamediv> <refname>mkdir</refname> <refpurpose>Makes directory</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>boo...
236213
<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.copy"> <refnamediv> <refname>copy</refname> <refpurpose>Copies file</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>bool</typ...
237116
<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <section xml:id="mongodb.tutorial.library" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Using the PHP Library for MongoDB (PHPLIB)</title> <para> After the initial extension set-up, we will continue explaining h...
238688
<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xml:id="function.json-decode" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>json_decode</refname> <refpurpose>Decodes a JSON string</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynop...
238689
<refsect1 role="examples"> &reftitle.examples; <para> <example> <title><function>json_decode</function> examples</title> <programlisting role="php"> <![CDATA[ <?php $json = '{"a":1,"b":2,"c":3,"d":4,"e":5}'; var_dump(json_decode($json)); var_dump(json_decode($json, true)); ?> ]]> </programlisting> ...