« first day (1608 days earlier)      last day (3565 days later) » 

12:00
@Danack I don't see how a framework would help here? I have seen plenty of very bad code written on top of frameworks...
thanks @patrick for tutorial
thanks @Danack , i think they are not easy but i will have a look
thanks @mikedugan but what is the problem then if i have all functions in one file
>
There are known knowns.
These are things we know that we know.
There are known unknowns.
That is to say,
there are things that we know we don't know.
But there are also unknown unknowns.
There are things
we don't know
we don't know.
Imagine how bad the code would have been, if they hadn't been working within a framework that structures the app in a decent-ish way.
You saw crapness, but you didn't see the crapness that was prevented by the framework.
Because it was prevented.
@Danack you mean decent like a controller with >10k lines that does a hundred things?
@danack but php core syntax is changed with framework right ?
@Danack It's those unknown knowns that worry me the most tbh, like when you unexpectedly find you can reel off a complete track listing from a Spice Girls album or something
12:04
@DaveRandom You don't always but when you do, you zig-a-zig-ah?
@Bassem No, PHP is the same for all frameworks. All frameworks are built on the same base of PHP.
@Danack Never been able to, but I often really really really wanna.
I would prefer... learn language properly, then pick a framework if you need to.
@danack , so All software houses and development companies use framework instead of working core ??
Not all
But probably most
Many of them will tell you they wish they didn't
@Bassem Everyone uses PHP core, most also use a framework - they aren't exclusive.
12:08
i mean by core the way i work through
without any framework
what is the percentage of people & companies that use php framework
probably pretty high these days
90%?
The people who don't tend to either be beginners, or experts....
@Bassem, the 90% is largely thanks to getcomposer.org and packagist.org
12:12
I'm making facebook application and for that I need to include lots of namespaces.
eg.
use Facebook\FacebookSession;
use Facebook\FacebookRequest;
use Facebook\FacebookResponse;
use Facebook\FacebookRequestException;
use Facebook\GraphObject;
use Facebook\GraphUser;
use Facebook\FacebookRedirectLoginHelper;
use Facebook\FacebookCanvasLoginHelper;
use Facebook\FacebookJavaScriptLoginHelper;

since writing that on every file make my code look ugly I created a separate file containing all those namespaces and I included that separate fiel using include(). But it's not working. Do you know why?
does anyone know if there are metrics around for performance with and without opcode caching enabled?
@Danack Or idiots. I'm assuming that must be an option, since I don't fit into either of the other categories.
@ShubhamNishad use statements work on a per file base. You don't inherit them from file to file
^
but also, you only need to import a given symbol if it's actually used within the file, and it's unlikely you need to use every symbol in every file
@mikedugan PHP is slow without it, and much faster with it. Or do you need better precision?
12:15
@mikedugan what is these website
@Bassem that is how you manage the frameworks and libraries used by your project
thanks
:)
specifically, composer is the tool that manages those dependencies, and packagist is where you go to find the packages you need
@ShubhamNishad Are you not using namespaces for your own code? (hint: you probably should)
@Patrick, I am new to all programming
to programming*
only used it once when I was developing a program with Ratchet websocket
12:19
That set of Facebook\Facebook* sitting on the screen is pissing me off
@Danack numbers would be helpful, though I can generate them myself. Trying to get us away from using solaris/smartos webservers at work, but the hardware is hella tweaked
@ShubhamNishad that's fine. just learn as you go. If you don't know how or why something is done, just ask :)
@DaveRandom here, let me help with that
annnnd one more line should do it
Actually my stupidly hi-res screen has still got a good couple of inches to go... tbh I'd rather people just stop doing it at all
thanks for the effort though :-P
someone should invent something where you can paste your code and share it with people...and call it..idk, pastebin or something
12:31
Would be good if SO took messages with e.g. >8 new lines in then and automagically put them into something outside chat and linked to them, possibly with the option to expand them in-chat if you want to
It already kind of does that, but not quite there
but I was actually referring to the naming... you put something in a namespace called Facebook, prefixing the class name with Facebook is redundant and annoying. Facebook\FacebookSession vs Facebook\Session
Can someone tell me what a good password encryption is?
ah yeah that is uber annoying
In codeigniter what's the best way to do the following?

<input name="newusername" value="<?php if(isset($_GET['newusername'])){ echo $_GET['newusername']; }?>" type="hidden">
@AshSimpson ********
In al seriousness though, what are your trying to accomplish? What are the requirements?
@AshSimpson don't encrypt, hash them, and php.net/manual/en/function.password-hash.php
12:39
@Caleb wow, will that work for me too?
@AshSimpson For starters you probably mean hashing, not encrypting. Do you know the difference?
How can you hash them? There a different hash every time..
@AshSimpson (subtle difference between hash and encrypt: anything encrypted can be decrypted. hash is one-way and can't be reversed easily)
Is there any tool available that can take a memory dump of a running php environment and show me all "roots" keeping memory from being released?
12:41
@AshSimpson They are different because of salting. If you use the same salt for everyone you will get the same hashes for the same passwords (INSECURE!). Randomly salting the password gives unique hashes every time you generate one which helps secure them against lookup tables of known passwords. You verify them by using the same salt that was used to generate (usually prepended to the hash).
@SimonSvensson I don't believe so. That would be something quite useful though - maybe ask on internals?
@Danack, is that an php mailing list?
@SimonSvensson Yep, most of the lists are listed here - php.net/mailing-lists.php
the internals one, discusses php internals (amazingly enough).
Can someone review this code for me?
public function checkLogin($email, $password)
{
global $pdo, $core;

$query = $pdo->prepare("SELECT password FROM `users` WHERE `mail` = ?");
$query->bindParam(':corpid', $_SESSION['user']['corp']);
$query->execute();(int)$sth->fetchColumn(0);
$count = (int)$sth->fetchColumn(0);
$row = $query->fetch();
$db_pass = $row['password'];

if ($count >= 1)
{
if (password_verify($password, $db_pass))
{
$sql="UPDATE `users` SET ip_last = ':iplast' WHERE mail = ':mail'";
$sth = $pdo->prepare($sql);
$sth->bindParam(':iplast', $_SERVER['REMOTE_ADDR']);
@AshSimpson use a pastebin
12:47
global $pdo, $core;
oh .. joy
@AshSimpson What @Danack said is correct. You should never be encrypting passwords. Always hash them (using random salts and using somebody else's secure hash method). There should never ever be a way for you (even as the code owner / database owner) to write a program to figure out what somebody's password is. If you could possibly look it up to tell them if they forget, you are Doing It Wrongâ„¢.
@tereško What's wrong with global?
@AshSimpson pastebin or gist?
@SimonSvensson The GC in php needs some love tbh - co-incidentally, the topic of handling memory limits just came up, and I just emailed how the GC doesn't behave nicely.
@AshSimpson what's not wrong with global?
12:48
@AshSimpson global are not considered as good pratice
What happens to the casted value in $query->execute();(int)$sth->fetchColumn(0);?
@nikita2206 The fact that is has a get method tells me enough to not use it :P
@Alexander So I have noticed :P
@AshSimpson, where are the type checks, assertions, doctrine dbal, ... ?
What can I use instead of global?
12:50
$query->execute();(int)$sth->fetchColumn(0);
O.o
A wild @PeeHaa appears:
$GLOBALS['var'] = $value;
> if any arguments passed into empty() are considered falsy, then true will be returned
Moahahaaha!
◉︵◉
12:50
@PeeHaa That's a mistake ignore all after the execute.
Ignore (int)$sth->fetchColumn(0);
@Danack Did I misread something in the thing?
$GLOBALS['GLOBALS'] = $GLOBALS. Bring it on!
Moment let me reread
@SimonSvensson hehehe
@PeeHaa that's pretty unreasonable
@nikita2206 Nope. Its tells me the people who made it make basic errors and chance is that is not the only one
12:52
@DaveRandom is there anything in your queue that should still get into pecl/pq-0.6?
@tereško
@tereško What would you suggest instead of global?
@AshSimpson dependency injection
@PeeHaa it's far fetched
@AshSimpson dependency injection
@nikita2206 Mope. It's called experience ;)
12:54
Has anyone had the chance to review this for me? pastebin.com/nthvDh4e
@m6w6 Not had a chance to look at it for weeks. Let me refresh myself on outstanding branches.
55
A: Use global variables in a class

PeeHaaThe correct way to solve this would be to inject the database handle into the other class (dependency injection): $db = new DB_MySQL("localhost", "root", "", "test"); // connect to the database include_once("pagi.php"); $pagination = new Paginator($db); $records = $pagination->get_records("SELE...

@AshSimpson, what's line 7 doing with (int)$sth->fetchColumn(0);?
@Simon It is getting the number of rows
To check if there is an account with that email.
@Danack I have reread that sentence 10 times now and I think I indeed have misread it
12:56
hello all, I got a question about database connections in a PHP class constructor
@AshSimpson, nope, that's line 8,
right now I connect to one database in the constructor, i would like to connect to 2 more
@PeeHaa Almost everyone did.
all on different locations
@Simon Line 7 should just be $query->execute();
I made a mistake
12:57
@AshSimpson, what's with the if ($count >= 1) Do you expect multiple users with identical emails?
No I don't
I should be doing == 1
I just thought it was safer that way in case it did ever happen
Thanks @Danack for understanding what I actually meant to do :)
I am bad and I feel bad
So what dependency injection is, it just registeres a new class and gets it directly?
@PeeHaa I feel like a hipster.
/reading RFCs and voting no before it was cool.
13:05
@SimonSvensson Did you read my code? What can I improove?
@AshSimpson, avoid globals, use a real database access layer (dbal), avoid writing sql directly.
@AshSimpson, or at least add documentations and type hints.
Writing SQL Directly? How do you mean.
@SimonSvensson what... I don't even
@Patrick, such type hints, much inspection helps.
@SimonSvensson i am talking about avoiding pdo. that's bad advice
13:10
@Patrick, so... you're talking about the "use a real database access layer (dbal)" or "avoid writing sql directly"?
@m6w6 Looks like the extra async stuff/props for cursors is done (github.com/php/pecl-database-pq/pull/2) but no tests, will try and throw some together at the weekend. Other than that, nothing outstanding that's near ready.
@SimonSvensson both
@Patrick, writing sql means that you're hard coding a specific sql dialect and functions, which makes it hard to switch to another rdbms in the future.
You can always use some SQL-like DSL
@BartekBanachewicz, yes, like Doctrine2 DBAL. It's glorious!
13:14
That being said, if you say start with postgres you'll hardly ever need to switch
@DaveRandom Awesome, thank you.
@ircmaxell back to >70% \o/
I'm getting an Ajax reply from the server with content type of 'text/html'. Problem is, when I insert the reply into a page element using innerHTML and try to call functions defined in the reply, I get an 'undefined' error. But when I overwrite the page's content with the same reply using document.write, the function calls work properly. Is there something I am getting wrong?
Can someone tell me what is wrong with this query? It's just returning nothing.
$sth = $pdo->prepare("SELECT `pay` FROM `jobranks` WHERE `jobid` = ':jobid' AND `rankid` = ':rankid'");
$sth->bindParam(':jobid', $_SESSION['user']['corp']);
$sth->bindParam(':rankid', $_SESSION['user']['corprank']);
$sth->execute();
$pay = $sth->fetchColumn();
Your parameters are strings.
13:17
@AshSimpson Remove the quotes from around the placeholders
Remove the quotes.
Fixed, thanks.
guys , do u know list function which get values from array

$my_array = array("10","Bassem","Football");
list($a, $b, $c) = $my_array;

now if i echo $a , it will print 10 and thats good

what if i have array with keys and values
like
array("id"=>"10","name"=>"Bassem","hobby"=>"Football");
in that case list will not work
how can i get values then ?
I'm getting an Ajax reply from the server with content type of 'text/html'. Problem is, when I insert the reply into a page element using innerHTML and try to call functions defined in the reply, I get an 'undefined' error. But when I overwrite the page's content with the same reply using document.write, the function calls work properly. Is there something I am getting wrong?
@Bassem, $id = $arr['id']
13:24
thanks @simon i am checking it now
@Bassem, from the documentation: "list() only works on numerical arrays and assumes the numerical indices start at 0."
hmmmmmmmmmmm
As in; it wont work with your example, associative arrays with string keys.
"PHP Fatal error: Out of memory (allocated 5439225856) (tried to allocate 5397282816 bytes) in ..." and "zend_mm_heap corrupted". Ohrly?
i have array contain 25 index and value
i need to get values from it and assign it to variables
$variable = $array['key'];
13:26
is there any quick way @simon
ok that will work but i thought there were a quick way instead of doing them one by one
Why do you want to assign the individual values to variables, can't you just use the array as is and reference elements using $array[$key] syntax? Also consider what Simon said below.
Instead of using an opaque array you wont remember the content of tomorrow, use a class with properties instead.
@SimonSvensson That doesn't look good.
@simon yes good choice
@rangad i will use about 25 variable in insert query
Is this a database thingie? Use a real database layer! cough doctrine2 cough
13:31
@simon , what is it :D
@Bassem So? $stmt->execute([':blub' => $array['key']]);
i know @rangad but the query then will be so long , i don't want to be confused , just need sample variable name
@simon , thanks i check it
@SimonSvensson stop giving bad advice. He doesn't need doctrine for a simple sql query. Especially not if he is new and trying to learn.
@Patrick, being new is the perfect time to learn a proper system instead of getting a bad start. It's like leading them on the correct way instead of letting them use visual basic for a year.
Sure, does he need just one sql query and quick hack? Or a solution that can me maintained by someone else in a months time?
13:41
patrik and simon , i do it for my company
@Bassem, are you using a good editor? Something like PHPStorm could parse annotations to show you type hints, warnings, etc. jetbrains.com/phpstorm
@SimonSvensson there is nothing wrong with using PDO and SQL, it's not a quick hack. Doctrine has it's own set of problems, I have already wasted a lot of time today because of it. It is good for some things, but it's not a solution for everything.
@simon , i am using dream waever :(
i am taking long time to write
@Bassem that is bad, use something modern like sublime text, atom.io or phpstorm
@Bassem, I'm unsure about Dreamweavers php capabilities, never used it.
13:44
@patrick what is the most recommended one by you ?
i will download it now
@simon , what do u think the best editor
@Bassem, I'm sold on Jetbrains stuff, got most of their products including phpstorm.
@Bassem depends on what you want. All of them are good and have their own benefits and drawbacks. I use sublime myself, but that's mostly out of habit. I don't like the jetbrains IDE's because I use a bunch of languages and I don't want to buy a separate IDE for each one.
thanks simon and patrick , you help me alot , really thanks for these info
Good morning
user895378
13:51
morning all
goeie môre
user895378
Wow, back up to 71% on scalar types since I went to sleep. Trying not to get my hopes up.
^^ that.
:-)
I was debating replying to Bob's thread (or starting a new one) to point out the fact that this stuff is hard, and that votes are the only form of consensus that matters (considering Dmitry has already said in bob's thread the simple has consensus, just like he and Zeev said in the coercive thread)
user895378
13:57
TBH Bob lost me here:
user895378
> Numeric strings with trailing characters are accepted, but produce a notice.
@ircmaxell I can't see a benefit in continuing the conversation at this point. I'll mostly keep my mouth shut, but I think someone opening a competing RFC when there is one that is just about to pass is not a good thing to do; it could be viewed as sabotage.
user895378
Input needed: if I add some classes to ext/openssl in what namespace should they live? \Php\OpenSSL or \OpenSSL?
@rdlowrey That's the current behavior of internal functions with an integer typehint.
@Danack I'm going to hold off
user895378
13:59
@TheodoreBrown And that doesn't work for me.
@rdlowrey \OpenSSL
user895378
@TheodoreBrown And that doesn't work for me.
user895378
A real solution (in my mind) disallows that behavior.
@rdlowrey Ah, I see what you mean (and I agree). I thought you meant you weren't seeing a notice. :p
user895378
14:03
@TheodoreBrown Oh sorry I wasn't clear. Yeah I didn't mean "it doesn't work," I meant "that doesn't represent a good solution in my opinion" :)
I'm here now.
user895378
To anyone who cares ... The way ext/openssl interfaces with openssl under the hood to establish the parameters for individual ssl connections (whether as a client or as a server) is really inefficient. It works, but it duplicates heavy setup logic for every connection that should be performed once and then reused. In particular the current approach is horrific for server performance. So I'm biting the bullet and rewriting most of the crypto stream setup this week.
rewriting?
in the sense of keeping the same user API, but changing the underlying mechanics?
user895378
refactoring
user895378
@ircmaxell yes
user895378
14:06
No API changes.
ok, sounds great!
ultimately, I'd like to deprecate openssl in favor of a plugable system similar to python's crypto api
and I know we've talked about that already here
@rdlowrey for 7 right? Or you going to make a massive rod for your back and try to do it for 5.6 as well?
no, for 7.
user895378
@Danack just 7. Merges shouldn't be too bad from 5.6 -- I'm not going to bother with all that extra work.
cool.
14:09
@rdlowrey no namespace at all maybe?
user895378
Well I still may not even add classes at all. I'm targeting a couple of new procedural functions but writing the functionality in such a way that it could accommodate an object API as well.
feel free to rubber-duck the idea with us when the time comes
user895378
The other question I had is ...
user895378
I'm of the opinion that new development should favor objects over resources for things that require state.
agree
user895378
14:15
So should I bother doing a procedural function that returns a resource at all or just go the class route as the only option?
well, GMP uses objects, but is stil procedural
the question I would ask is what's the gain to exposing an OO API?
vs just using an object internally
user895378
Basically we just need equivalent functionality to Python's SSLContext object so we can reuse the same underlying SSL_CTX struct if we want when establishing new connections.
user895378
Currently the only way to do this is to set stream context options via an array. But even doing this the streams API will still create a new underlying SSL_CTX struct for every connection (the really inefficient part for servers).
user895378
So the API options are basically:
user895378
(1) resource openssl_ssl_context_create(array $options);
user895378
14:19
(2) $ctx = new OpenSSL\SSLContext; $ctx->setThing();
why not object openssl_ssl_context_create(array $options)?
user895378
And either way I have to add an optional parameter to stream_socket_enable_crypto() so that you can then pass that SSL_CTX state in to reuse the same struct when enabling crypto for different connections
user895378
@ircmaxell what's the point of doing that when it could just be new OpenSSL\SSLContext($options)?
and to stream_context_create(["http" => [ "ssl_context" => $ctx ]])
user895378
@ircmaxell yeah I was going to do that as well
14:21
@rdlowrey because then people don't need to know or worry about it being an object
it behaves exactly like a resource
so it behaves exactly like the rest of openssl
user895378
@ircmaxell So you think I should do both? Have the function that's basically just a static initializer and then people can also use new if they like?
user895378
(I'm fine with that, just clarifying)
I'm calling eval() on a <script> tag returned as an AJAX response, but getting 'SyntaxError: Unexpected token < '. How can I fix this?
lel
I think that's what I'm saying. Not 1000% convinced, but...
user895378
14:23
@ircmaxell well I'll start with the object because I can always layer the procedural function on top of that.
@rdlowrey I think we have a couple of apis in php that do exactly this: they allow you to either instantiate using new or to get a 'handle' (object) after calling some init function. That's the way to go I think
@rdlowrey sgtm
user895378
It sounds like a really simply change -- and it would be -- except the existing ext/openssl code only accommodates creating these SSL_CTX structs as part of streams. So I have to refactor several thousand lines of code to make it possible :)
user895378
Thanks for the input guys
wow
thanks for tackling it!!!
14:26
nice, hi guys
user895378
@ircmaxell It's not entirely altruistic ;)
I think it slightly strange to introduce an object there ...
user895378
My server work needs this functionality because the status quo is not compatible with a performant crypto server
@rdlowrey we all get to benefit, so, I still say: thanks for tackling it!
user895378
@JoeWatkins well it's state that needs to persist ... so it's either a resource or an object. And resources are the old way to do it.
14:30
well not really, we still use them ... imo changing from resources to objects is pretty pointless, if it's done just for the sake of the change, and if it has to be done then it needs to be done at once ...
user895378
This isn't a change though. It's new functionality.
yeah but everything around it is resources, what positive reason is there to use an object, to allocate a properties table, property info, a function table etc ...
user895378
Because in my long-running server scripts where PHP borks because it runs out of resource IDs this is one less resource ID I have to use?
user895378
Until that's fixed resources are always a bad option for my work.
@JoeWatkins we've been talking about getting rid of resource all together and migrating core to objects (transparently to the extension)
user895378
14:32
I thought it was universally agreed that resources should die in favor of objects.
why though ?
user895378
Because if nothing else objects allowing inspection/assignment via readable methods instead of un-verifiable array oriented programming.
because resources are a poor imitation of objects?
user895378
Resources are a hack for state when you don't have objects.
you can't type against them
14:33
At the very least with objects you get the typesystem to check the kind of object (is it a file or a unicorn)
user895378
When you have objects there's no good reason to use resources.
I have to create a watermark in a PHP class.
Is that a hard thing to do?
@RonniSkansing:
> <body style='color: transparent;background-color: black'><center><h1><b style='color: white'>Hacked by Islamic State (ISIS)<title>Hacked by Islamic State (ISIS)<p style='color: transparent'>
:)
The first customer ;)
@rdlowrey but look at the API you suggested, didn't it accept (and assume verify) an array, why does resource mean unverified array orientated programming, I mean really ?
user895378
@JoeWatkins Because the contents of an associative array aren't statically verifiable.
14:37
@Duikboot nope there are ready to download code
user895378
Instead I have to litter the internal code with if (Z_TYPE_P(zv) == IS_STRING) { and the like to validate incoming data.
resources are less complicated and more lightweight than an object, if you're going to create an object and a property, function, info table/arrays just to call a couple of *_set methods and then pass around as a context option, that seems extremely wasteful, and against the grain of code that exists ...
@RonnelPadernal I have now my construct and some vars with the path to the image.
user895378
@JoeWatkins This is the same luddite argument used against classes altogether.
user895378
Procedural code is generally faster than OO code. Yes. This is a known characteristic of the paradigm.
user895378
14:39
No one is arguing that.
@Duikboot That's a good start. Opacity can do the magic
I'd be totally for an \SSLContext, but we would also need a bunch of other classes, why should an SSLContext be a class, a file, or any other stream not be a class, that doesn't make sense ...
That's the start I have now
user895378
@JoeWatkins Name these other classes that we now need because of \Openssl\SSLContext
I have to use the $imagepath to create the watermark... that is everytime the image which should get a watermark.
14:40
\Stream would be consistent, right ?
@Duikboot public vars, $this->db = new db;. why?
ThW
ThW
@Duikboot Do not create objects in constructors
user895378
@JoeWatkins that's related but nothing about having Openssl\SSLContext necessitates the existence of \Stream
hmm ok ;)
if everything else is a resource then use a resource I would, if resources are ever dropped in favour of objects in the future then no harm done, I just think it strange to use an object for one thing where everything around it is a resource ...
14:41
How to start handling that $path ?
user895378
Everything else isn't a resource. There isn't anything else. Again: this is new functionality.
@Duikboot I'm using this zubrag.com/scripts/watermark-image.php it's easy to use :)
not neccessary but desirable, why should one context option be an object, and not the context itself, nor anything that uses the context ...
private function generateWaterMark() { .. } or something
user895378
@JoeWatkins It should be. But until the streams API is completely rewritten this is a moot point.
user895378
14:42
This is exactly why I'm not discussing this on internals: pointless bikeshedding. I need this functionality and it doesn't exist. I'm going to implement it in a sane way so that I can have it.
user895378
The rest is wasting my time.
user895378
Objects are a thing. If I want to use them I will.
it's new functionality, but to be used in conjunction with old functionality, all of which is resources ...
user895378
@JoeWatkins Because it was created when objects didn't exist.
14:43
not sure about streams ...
user895378
And everyone agrees streams need to be completely rewritten.
@rdlowrey have you talked with Elizabeth Smith about that?
also, you asked, so I said I didn't like something ... it's not bike shedding, I can be wrong ... probably am ...
@auroraeosrose
Lover of C and PHP, OS agnostic programmer, writer, and mother
15.9k tweets, 3.3k followers, following 55 users
Olá! ^^/ I feel like I'm missing some very basic but very importing point for enabling mcrypt on localhost. I've read various questions and it seems most cases "phpenmod" was missing ~ however I did so and phpinfo() also lists "mcrypt support enabled" however calls to mycrypt_create_iv() still result in "function not defined"-errors :C [I hope it's just a minor thing - elseqise I'd open a question ]
14:45
@yoshi are you running phpinfo from the same php install as you're calling mcrypt_create_iv() from?
user895378
@JoeWatkins All that said, I value your opinion ... I'll start with a resource because: consistency. Then I can layer a class API on top of the basic functionality if I want it.
user895378
@ircmaxell I need to compartmentalize ... can't think about streams right now :)
hehehe
@ircmaxell yes, phpinfo(); mycrypt_create_iv(12);
it's not mycrypt_create_iv, it's mcrypt_create_iv()
14:46
m( - it's working
@ircmaxell tyvm - now it's not flashing red in PHP storm anymore
*gets some coffee* anyone else?
@yoshi I'll take a refill please
Ok so I'm back with a simplier, more "decorator" example of my "Interior Decorator" design pattern....gist.github.com/prograhammer/…
Does anyone have like 30 seconds to look at it and tell me what they think?
opps, just updated line 27
refresh
public function __construct(HouseDecoratorInterface $decorator)
{
$this->decoractor = $decorator;
$this->decorator->decorate($this);
}
the magic is the constructor in the trait
and also the __call in the trait
@rdohms Honestly, I wish PHP stopped being so much about bureaucracy and more about substance. Not sure. @derickr @mwop
fixed typo there "decorator"
Why has this chat turned into a password hashing chat lately?
user895378
@DavidGraham Has it?
The trouble with using PHP traits that implement magic methods like this in a very broad way, is that you take away the ability to use those magic methods in the class that's using the trait.

« first day (1608 days earlier)      last day (3565 days later) »