اختيار جديد مع روابط للأخبار والمواد. في الإصدار: PHP 7.3.0 Alpha 2 ، خطط لـ PHP 8.0 ، وخصائص Typed و RFCs الأخرى من PHP Internals ، وجزء من الأدوات المفيدة ، وأكثر من ذلك بكثير.هل لديك قراءة لطيفة!
class Example { // All types with the exception of "void" and "callable" are supported public int $scalarType; protected Type $type; private ?Type $nullableType; // Types are also legal on static properties public static iterable $staticProp; // Types can also be used with the "var" notation var bool $flag; // Typed properties may have default values (more below) public string $str = "foo"; public ?string $nullableStr = null; // The type applies to all properties in one declaration public float $x, $y; // equivalent to: public float $x; public float $y; }
define()
continue
switch
switch ($a) { case FOO: // Works exactly as current behavior. break; case == FOO: // Nearly identical, though we don't use the ZEND_CASE optimization. // Can probably make this equivalent to `case FOO`, but it felt like an interesting direction. break; case === FOO: // Only triggers if `$a === FOO`, no type juggling break; }
شكرا لكم على اهتمامكم!إذا لاحظت خطأ أو عدم دقة - يرجى إبلاغي في PM .إرسال الأسئلة والاقتراحات إلى البريد أو تويتر .إرسال رابطروابط البحث لجميع الملخصات← الإصدار السابق: PHP Digest No 132
Source: https://habr.com/ru/post/ar415057/More articles:الأحداث الرقمية في موسكو من 25 يونيو إلى 1 يوليوإنشاء أوامر الإدارة في DjangoIsometry ، مؤشرات z في ألعاب الجوال وتحسينهالماذا تعمل معالجات Skylake في بعض الأحيان أبطأ مرتينملخص المواد الطازجة من عالم الواجهة الأمامية للأسبوع الماضي رقم 320 (18-24 يونيو 2018)أسرار المطبخ جافا سكريبت: التوابلمن الواجهة الأمامية إلى الواجهة الخلفيةستبدأ Blue Origin في بيع التذاكر لسياح الفضاء العام المقبلكيف تمكنا من قراءة المخطوطة الموجودة في الثمانينيات بالقرب من المحرقة الثالثة في أوشفيتز بيركيناومسعى آخر للحلم. RTS + أيدي طالب الحاجبAll Articles