Answer the question
In order to leave comments, you need to log in
Russian-language podcast about PHP?
Is there a Russian language podcast about PHP?
There is about JS (Frontflip), about Ruby (RWPod and Ruby noname), but about PHP in Russian I did not find it. There are really guys from UI Web Design, but they are about Wordpress, and not about PHP in general.
In English podcasting I listen to PHP Town Hall and Voices of the Elephpant, but both sound bad and often just pour water and laugh into the microphone.
Maybe stir up a high-quality Russian-language podcast about PHP? Who wants to participate?
Minimum program: a brief overview of news from the world of PHP over the past week (analogous to the "digest" published on Habré) up to 10 minutes long. You will get something similar to the podcast "Five Minute JavaScript (5minjs)", which was peppy and interesting
Program maximum (from 40 minutes):
- news from the world of PHP (similar to the "digest of interesting news from the world of PHP" published on Habré)
- a more detailed discussion of some library / framework / approach, you can with a guest in the studio - a specialist in this framework / library
- announcements of events, conferences ; a story about the past, a discussion of the most interesting reports / articles (links to slides, YouTube or an article)
- topics for listeners
UPDATE 05/19/2015
As a result, I muddied a podcast on the program at least, listen to the pilot episode: 5minphp.ru
Answer the question
In order to leave comments, you need to log in
why?
Only the number of people who write the names of variables in transliteration and are not able to understand the elementary errors that the interpreter gave them
will increase
To be honest, it's not clear why... There are tons of information about php.
Although, I could be wrong. What topics are expected?
2 questions:
- why is the code below shit?
- why is the code below NOT shit?
))
<?php
namespace vendor\project\some\models;
/**
* Class User
*/
final class User implements \Serializable
{
const FIELD_USER_ID = 'userId';
const FIELD_NAME = 'name';
const FIELD_PASSWORD = 'password';
/** @var int */
private $userId;
/** @var string */
private $name;
/** @var string */
private $password;
/**
* User constructor
*
* @param string $userId
* @param string $name
* @param string $password
*/
public function __construct($userId, $password, $name)
{
if (empty($userId)) {
throw new \InvalidArgumentException('$userId MUST NOT be empty');
}
if (!is_int($userId)) {
throw new \InvalidArgumentException('$userId MUST be int');
}
if ($userId < 0) {
throw new \InvalidArgumentException('$userId MUST be more than 0');
}
if (empty($password)) {
throw new \InvalidArgumentException('$password MUST NOT be empty');
}
if (!is_string($password)) {
throw new \InvalidArgumentException('$password MUST be string');
}
if (mb_strlen($password) !== 32) {
throw new \InvalidArgumentException('$password MUST have length 32');
}
if (empty($name)) {
throw new \InvalidArgumentException('$name MUST NOT be empty');
}
if (!is_string($name)) {
throw new \InvalidArgumentException('$name MUST be string');
}
$this->userId = $userId;
$this->name = $name;
$this->password = $password;
}
/**
* @return string
*/
public function getUserId()
{
return $this->userId;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @return string
*/
public function getPassword()
{
return $this->password;
}
/**
* @return string
*/
public function serialize()
{
return serialize(
[
self::FIELD_USER_ID => $this->getUserId(),
self::FIELD_NAME => $this->getName(),
self::FIELD_PASSWORD => $this->getPassword()
]
);
}
/**
* @param string $serialized
*
* @return string
*/
public function unserialize($serialized)
{
if (!is_string($serialized)) {
throw new \InvalidArgumentException('$serialized MUST be string');
}
$data = unserialize($serialized);
if (
!isset($data[self::FIELD_USER_ID]) ||
!isset($data[self::FIELD_NAME]) ||
!isset($data[self::FIELD_PASSWORD]) ||
(count($data) !== 3)
) {
throw new \InvalidArgumentException('Invalid serialized data');
}
return new self(
$data[self::FIELD_USER_ID],
$data[self::FIELD_NAME],
$data[self::FIELD_PASSWORD]
);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question