« first day (1825 days earlier)      last day (3133 days later) » 

9:05 AM
ok guys, I have a situation so, if someone can help, I'm willing to put a bounty on this.
2
Q: Replace strings with preg_replace

Josip IvicI've been trying to replace some strings within a big string. This string contains some code blocks. The structure is basically something like this $str="<pre>some code</pre>some non code<pre>some code again</pre>..."; I'd like to replace all the code by something like this <div style='..'><pre>

 
@Gordon Nah, been pushing DI for years here, I know a lost cause when I see it
People need to want to be helped :)
 
@Jimbo for years? didnt you just start that job?
 
@Gordon Went back to same company
Different position
 
ah. didnt know that.
 
@Gordon Btw that DDD book (blue) is awesome
I've been doing repositories the correct way, I saw one of the diagrams inside before I even looked at DDD and was like "ha, I already do that!" :D
 
9:08 AM
@Jimbo cool
 
Highly recommended if you haven't already read it
 
@JosipIvic why aren't you using a proper html parser?
 
@Jimbo I have read it.
 
@JosipIvic Unless you want a proper solution instead of a broken regex one don't expect a lot of love from this room :)
 
@Jimbo buy the red one now ;)
 
9:11 AM
@Gordon I was literally just about to ask - is the red one any good?
 
@Jimbo depends on who you ask. there was some debate about this here a few weeks back
 
Ah, is this one rather opinionated then
 
in a nutshell: the blue one focuses on the technical patterns like repo, vos and entities. the red one focuses more on the strategic aspects and on how to implement proper boundaries.
 
I already feel like I'm going to have to re-read this blue one a bunch of times, but I'll check out the red one too
 
Good mooning, roomies.
 
9:15 AM
Anyone know Magento quite well?
 
\o
 
@PeeHaa hell, I'd consider giving him a working regex if he had a good reason to require it and hadn't already moved the goalposts on hjpotter92
 
@PaulCrovella "Nobody" who ask for a regex solution to parse html on main has a good reason for it :)
 
oddly enough, the moving goalposts bother me more than summoning Cthulhu
 
9:19 AM
Damn animated gif
 
"I put the fires out." / "No you didn't, you made them worse." / "Worse, or better?"
 
@Gordon Interesting read, Danack didn't seem to like it
But I'll persevere through the tonnes of words if I learn stuff
 
that makes them look fun
 
9:28 AM
Good morning
 
/me needs that book
=]
 
@Jimbo I find that DDD book reads very well.
 
@andho Much better than the other Red book, from what I've seen
 
Unlike Patterns of Enterprise Application Architecture
 
@andho Naruto also reads very well .. that doesn't make it a good programming book
what is important is what the book teaches about DDD
 
9:33 AM
@tereško I couldn't read the manga without Colors.
 
@andho try Nobelesse (it's colored)
as for "Patterns, Principles and Practices of Domain-Driven Design", I guess I will have to add it to the "read later"
 
Running something that takes 6 hours to execute "without delay" is a contradiction in terms - it doesn't make any sense ... update the question with a clear description of the whole problem and your current solution. — Joe Watkins 12 secs ago
not sure how time works ... ^
 
@tereško On the anime-side, I started watching death note yesterday. On second disk already, it's awesome
 
@Jimbo it is .. but it fizzled out towards end
 
9:36 AM
Aw crap, wish I hadn't said anything, now I'm going to be expecting that
 
@Jimbo - is the ddd book easy to read?
 
sorry
 
:D
@Adoni The blue one? I'd say it's not super easy, but it's not hard. Things are summarised in bold at the end of lots of text, and there's diagrams and explanations. I find I have to re-read a few things to get it.
 
@JoeWatkins Sounds like OP is doing something very wonky either way
 
@tereško Oooooh
 
9:38 AM
@PeeHaa yeah definitely doing it wrong, trying to encourage the right kind of questions ... but not getting anywhere ...
 
@Jimbo I've tried reading the blue one (the original), and takes some .. thinking. What's the red one like? ;)
 
@andho you can read it here: mangafox.me/manga/noblesse (just be prepared that first few volumes might feel iffy .. it's a new author)
 
@AlmaDo lol @AlmaDo my tweet about this resulted in me being added to two laravel lists:
> Snowflake Creative added you to list snowflakeweb/laravel
9m9 minutes ago
Francesco Lettera added you to list FrancescoLetter/laravellist
lel
 
@Adoni Oh, I haven't read the red one yet, I'm thinking of buying the one I linked above
 
@Adoni for me Blue One clicked a lot. Red one is (still cannot seem to finish it) boring as I know most of what it explains, and also it feels repetitive. Red book is more practical, so there is more technical stuff to go through.
Same as Design Patterns book by Martin Fowler, which is boring but very insightful.
And again, Design Patterns book is also very technical
sorry that is "Analysis Patterns" by Martin Fowler
 
9:43 AM
ok, anyone online with symfony2 experience?
got few questions
 
@tereško Yush, and if not can help search
 
@tereško maybe
 
so, as I understand, the application code should go in bundles
how should a bundle be structured?
the manuals kinda skip over that
 
@tereško IIRC there is some default demo bundle somewhere
 
@tereško The tut on the main site I think gives you a command to run to get the default demo bundle
But bundles are effectively modules, with their own configurations, business logic
 
9:46 AM
@tereško thanks man
 
You hook them in by 'loading' them, if I remember right, into the http kernel by changing a config in the main application section
plugin architecture attempt
 
yeah, well, I opened the source of what's in the default bundle
and only code that it contains I find highly objectionable
public function indexAction(Request $request)
{
    // replace this example code with whatever you need
    return $this->render('default/index.html.twig', array(
        'base_dir' => realpath($this->container->getParameter('kernel.root_dir').'/..'),
    ));
}
I mean, for fuck sake
 
@tereško there is a couple of articles and videos by Matthias Noback on that subject
 
links?
 
just put noback bundle into google and pick one that sounds interesting
 
9:49 AM
ok
 
@tereško :D
 
user3119231
how can I check if an array in an array is double? (is for search and returns twice if the search letter is twice in value)
 
user3119231
		$results = [];
		foreach($rows as $row){
			foreach($row as $cell){
				if (strlen(strstr(strtolower($cell), strtolower($_GET["search"]))) > 0){
					if (in_array($row, $results) == false){
						$results[] = $row;
					}
				}
			}
		}
 
user3119231
this is my current search code
 
@tereško my 2c, dont bother with separating your code into bundles
@tereško this is the fabien's recommendation: symfony.com/doc/current/best_practices/business-logic.html
 
10:12 AM
Mornin'!
 
@PeeHaa which one?
 
@JoeWatkins pong ... softly
 
@NikiC nnggghhh
 
How do active record tools implement eager loading?
Say you want a list of books and their authors (separated into two tables), how do they populate the book records with the author details without having to loop through each book?
 
10:19 AM
The only way I imagine is by grabbing all the book ids, running a second IN([book ids]) query on the authors table and then looping through the results to bundle the right authors up with the right books
well, bad example, swap author and book around. Get a list of books for each author.
 
ok, what is this "Controllers as services" bullshit that I keep hearing about in Symfony?
 
@NikiC would the best way to truncate a smart_str be to use zend_string_truncate on the ->s and update the ->a?
 
@NikiC so replacing internal functions creates a huge mess, in anything other than simple test code, it fails really badly in really strange ways ... so rather than spend a month trying to figure that out, I thought it better if override functions were stored in a separate table, and then execute_ex execute_internal handler can look in the table for an override ... this works ... but is that sound ?
I seem to have many problems, but don't know enough about them to describe them right now ...
it seems to work, but again in complex test suites it all goes wrong ...
 
10:40 AM
@Andrea I'm mostly +1 on your void functions RFC, though I don't fully agree with the usage of void functions in expressions. If a function is declared to have a void return type, and then it is subsequently invoked in an expressed, then I feel that this is almost certainly a programmer error. I think the following semantics would be better: 3v4l.org/qT0gC
 
youtube.com/watch?v=rPAAoSFfFww I always wondered what this text means ' skopje skopje die skpjeoeo'
 
Abe
what is classified as not-expression in php? since void functions are allowed to use in expressions, then when are them disallowed?
 
10:58 AM
@NikiC I can hear myself ... not making sense ... sorry about that ... my first question is, is it sound to zend_call_function inside execute_ex/execute_internal ?
 
I have a dynamic php script, whose response i wish to show in an iframe
<form action="pnl_charts.php" method="post" target="iframe_a">
<input type="submit" value="Plot" \>
<iframe width="100%" height="300px" src="my.php" name="iframe_a"></iframe>
when i give target as_blank, it works as expected(opens in new tab) however im unable to open it in iframe
 
@Abe statements, e.g. if, while, etc., are not expressions. here is a pretty good rundown on the difference.
 
Abe
@PaulCrovella if(voidfunc()) ?
 
my pnl_charts.php, takes some arguments from form, runs a shell script that creates some.file.php which is shown
 
Abe
so you are telling me this is allowed basically
$foo = voidfunc();
if($foo){}
 
11:02 AM
either one would be allowed, I used if as itself an example of a statement rather than an expression
 
Abe
you would think that in 2015 people learned that nopaste services exist
 
i.e. allowing void functions in expressions means they're allowed anywhere a non-void function would be
 
@JoeWatkins well, sure… look at call_user_func() which does exactly that.
 
Abe
@PaulCrovella but it doesn't look to be much of an improvement. or more likely, i didn't understand
 
Yeah, I can't say I'm behind it. null is already our "no value", and will be returned anyway. Making a distinction between void and null tries to give null a meaning it doesn't have.
 
Abe
11:10 AM
i would disallow assigning void to a variable, and passing void to other functions
the only use case for void functions in expressions are ternary-ish operators:
$foo ?: voidFunc(); // note that there's no assignment
$x = $foo ?: voidFunc(); // this should be disallowed
 
Disallowing void functions in expressions might give it some kind of use, I dunno. The whole thing seems like a solution in search of a problem.
I'd just allow null as a return type and treat it like everything else
 
Abe
@PaulCrovella void and null must be kinda the same. but null must be the only real type. the difference is in the type hierarchy in my opinion. while null is "final", void is contravariant to any other type
when function return types will allow variance i'm expecting a():void{} be possible to override as a():string{}
 
Abe
while instead a():null{} -> a():string{} would be an error
 
$foo = doesNotReturnAnything(); // What's foo's value?
 
Abe
11:17 AM
it's null @MadaraUchiha
 
@Sean ActiveRecord as a pattern is basically just a live data row with added business logic. Relations to other tables that warrant any sort of eager or lazy loading are contrary to the pattern because you are not dealing with a single row anymore
 
Thanks
 
Morning's
 
Abe
o/
 
@Gordon Hm, was looking at Eloquent which is what prompted the question. It describes itself as an ORM activerecord implementation
 
@Sean yes, people like to tuck ORM features onto AR for some reason, ignoring that Data Mapper is better suited for that purpose.
 
@Abe If you want to be able to return anything, you just don't specify a return type - what use would void be?
 
Fair enough! Using an active record type system & was wondering if there was an efficient way to grab data from joins without having to query another N times. The ability to prepare a collection for accessing it's relatives seemed pretty good haha
 
Abe
in a child class may want to return anything. while in the parent class was designed to return nothing
 
11:24 AM
question to core devs: when I run php -i there is a datum "Debug Build". Under what circumstance can this be true and what does it mean if it is?
 
Abe
wat?
class A{ function x():void{} }
class B extends A{ function x():string{} } // valid, covariant
class C extends A{ function x(){} } // valid, covariant
class D extends C{ function x():void{} } // invalid, contravariant
not getting your point, sorry :P
 
@Gordon --enable-debug I would assume
 
@PaulCrovella I believe the point was raised that using void is a way of declaring that there should never be a return value. A bit like if($var) vs if($var === true)
 
@Sean functions always return and we already have that, null which is "no value"
 
@PeeHaa ok, so Compile with debugging symbols.". but what does that actually mean?
 
11:31 AM
@Abe That void adds nothing over just using class A{ function x(){} } in your example. Return types we've got are invariant, and even if they weren't I'm not sure it'd make sense to consider void a supertype of everything
What would be the use of declaring a void return in an interface then, for example?
 
@Gordon phpinternalsbook.com/build_system/building_php.html ctrl-f "--enable-debug" for the paragraph about it :)
 
@tpunt thanks! very useful.
 
Abe
@PaulCrovella
interface A{ function x():void; }
class B implements A{ function x():string{} }
function test1(A $x){
    $x->x(); // method can sure return something, but i'm not going to use it, since it doesn't _necessarily_ return something (as in A::x)
}
function test2(B $x){
    $x->x(); // method will certainly return a string (as in B::x), since i've type-checked for B
}
 
Array
(
[0] => Array
(
[fee_id] => 15
[fee_amount] => 308.5
[year] => 2009
)

[1] => Array
(
[fee_id] => 14
[fee_amount] => 308.5
[year] => 2009

)

)
 
@Abe and that differs from interface A{ function x(); } how?
 
11:41 AM
In the above code is there any way to rename 0 & 1 to custom name?
 
Abe
@PaulCrovella that could return a value
 
Can anyone help me..?
 
Abe
makes sense?
 
@Abe can you please help me on it..?
 
@Abe Everything that implements it either way, whether the interface declares void as a return or not, could return a value. Make sense?
 
Abe
11:47 AM
no return type = may return something, or nothing/null
void = will certainly return void
so if you type hint for the interface, you don't want to use the return from that function
it could return a value though, but you don't want to use it. since you type checked against the interface, and in the interface it's declared as void
 
with your void as a supertype you're not actually getting "will certainly return void", you're actually getting "may return something, or nothing/null"
 
lolwut php.com
 
if interfaces can't hold implementations to actually not returning, then the use of void is diminished as a tool for preventing errors.
 
user895378
morning o/
 
Abe
@PaulCrovella please can someone stab me in the back :P
 
11:54 AM
anyone using amazon aws s3?
is there any way we can create something like token for object? instead creating private url of every object one by one
 
@Abe I understand your position completely. I'm not convinced it'd be net benefit. Rather I think it'd make void even less useful than proposed.
that's all
 
@rdlowrey ohai
 
@PeeHaa old
 
You are old
 
and now you're even older
 
12:01 PM
:-)
 
Abe
i don't believe the proposal covers variance at all. but there's the intent to implement it, and void could be included as well. in my opinion a signature declared to return void means "you are not supposed to use the return value out of this" but it's still open for modifications. overriding functions can still decide whether to return something, if they want
 
E_TOO_MUCH_OLD_PEOPLE
 
@PeeHaa your momma is old
 
Abe
though this is a new world. because void and null are totally different in other languages
 
E_SCHOOLBOYS
 
12:04 PM
@Gordon :-D
 
\o
@Gordon she probably actually is
 
@Abe If you don't want to return anything, just don't, imho. Use return; not return void; or something like that
 
~o~
 
@tereško "mature" :P
 
@tereško I ain't telling no lies. My insults are always factual ;)
 
12:11 PM
> X-Powered-By:PHP/5.2.1
 
@FlorianMargaine thanks for reminding me of that. Gonna note that down as additional monitoring item
 
@FlorianMargaine X-Powered-By: Granny
6
 
@FlorianMargaine lol
 
Cougar PHP
 
If I have a function in a script and I never call it, it will be compile?
or it is like: that function is not exist ...
 
12:18 PM
@Sajad if the file is include'ed it will be compiled
 
yes it is included
 
then compiled it is
 
actually I have 10 functions in one file, and always I need to one of them, how can I prevent of compiling other functions?
 
why do you want to prevent that?
 
I like to my project be optimize
 
12:19 PM
@Sajad Put them into classes and autoload
 
@Sajad is it always the same one that you need?
 
@Machavity yes, I have thought about this manner, it can be fine
@salathe no (not same faction, but always one function)
 
@Sajad it will likely not make a difference whether there is ten functions in that file or only one
 
@Gordon odd ..
 
:26298157 it will make a difference, but likely not a significant one, e.g. it will be miliseconds.
 
12:22 PM
More like microseconds, or smaller.
 
@Sajad He's right. The only reason you'd need to be concerned with that is if you're concerned with a function collision (which is a broader problem)
 
and even smaller when you got an opcode cache. you do habe an opcode cache, @Sajad, do you?
 
But the point is the same, there are probably (most likely) bigger targets to attack than loading 9 unused functions.
 
@Gordon look, each function has 50 lines of code!! still you think there is no difference ?
 
@Sajad yes.
 
12:23 PM
@Gordon ok, if you say "yes", so there is no difference, well thanks :-)
@Machavity and thank you!
 
oh good, I thought you weren't gonna be able to sleep again
 
/makes Jedi gesture: This is not the optimization your are looking for
 
yes, maybe it is not concept of optimization, but I'm obsession a bit and even milliseconds are important to me
 
@Gordon why did you just wave at me?!
 
@PaulCrovella are you talking to me?
 
12:27 PM
@salathe to say hi
 
I didn't know Jedi gestures used two fingers like that.
 
@Sajad Yes, you had me worried for a moment.
 
@PaulCrovella :-) !!! I have decided to ask less than always ;-)
 
@Danack On two separate hands no less
 
*makes a gesture in @Gordon's direction*
 
12:28 PM
@Danack I dont use my hands for Jedi gestures. I swing with … ah, let's not get into details …
 
*makes food*
 
We all know Gordon shoots first
 
@Machavity :D
 
...
 
@Sajad You're listening more, which is what I'm really happy about.
 
12:30 PM
@PaulCrovella yes, btw, I'm trying to not be concern about small thing (like using IF() statement)
@salathe I see
 
hello just want to ask something
$image = ?> <div class="the-image"> <a class="image" href="<?php echo get_permalink(); ?>"> <?php MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'third-image') ?> </a></div> <?php ;
whats wrong with that one?
 
You can't split your PHP closing and opening like that
 
how?
 
$image = ?>
 
$image = '<div class="the-image"> <a class="image" href="' . get_permalink() . '"> ' . MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'third-image') . '</a></div>' ;
uses concatenation
 
12:43 PM
yes I use that but the image shows outside the div "the-image"
 
Ah. Sadly, that's not something we can help you with
 
Thanks for your concern bro
my current code but cant be spit?
 
Have you tried the code I just gave you?
 
the current obsession about null as a return type instead of void surprises me
 
yep
 
12:50 PM
it's interesting how often alternate opinions get dismissed as "obsession" around here
 
I'm not dismissing it
it just seems strange, people usually argue in favour of the status quo
 
@Machavity he'll probably want to use MultiPostThumbnails::get_the_post_thumbnail(... there
 
@Andrea Describing it as obsession does that. No different than describing yours as being obsessed with void. Neither is appropriate.
 
@Andrea I've never really understood the "confusion" over null and void in the PHP world. It's not a difficult concept...
 
@PaulCrovella fair enough
By the way, function foo(): null {} would be a type error, unless we special-cased null
 
12:55 PM
@salathe Considering we're talking about a language that considers null and false the same...
 
What was the function name()*: type* {} syntax inspired from?
 
@Machavity That's not a difficult concept either...
 
@MackieeE Hack and TypeScript/ActionScript?
 
0
Q: Using target as iframe for dynamically created php page

user1977867I have a dynamic php script, whose response I wish to show in an iframe <div id="plotpnl"> <b>Graph :</b><br><br> <form action="create_charts.php" method="post" target="iframe_a"> <font color="#587E91"><b>Strats : </b></font> <input type="text" style="width:220px; margi...

 
@Andrea it's currently an error, but I don't know how "special" that case would be, null is at least documented as a type all its own
 
1:00 PM
@PaulCrovella it would be an error if a null type hint was added, I mean
implicit return in a type hinted function = error
 
ah, gotcha
 
Wahoo! 1000 rep!
 
has its own special error message, even
 
It's the little victories ^^
 
wtf some ad platform added some code to a banner of a client of mine. What this also added was this:
	<!--Last Updated 9.14.2015
	+      o     +              o
		+             o     +       +
	o          +
		o  +           +        +
	+        o     o       +        o
	-_-_-_-_-_-_-_,------,      o
	_-_-_-_-_-_-_-|   /\_/\
	-_-_-_-_-_-_-~|__( ^ .^)  +     +
	_-_-_-_-_-_-_-""  ""
	+      o         o   +       o
		+         +
	o        o         o      o     +
		o           +
	+      +     o        o      +
	-->
:|
 
1:04 PM
@PeeHaa nyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyany‌​anyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyany‌​anyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyany‌​anyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyany‌​anyanyanyanyamessageistoolong
 
"..anyanyanyamessageistoolong" -- haha
 
@PeeHaa That code is so yesterday
 
@Machavity I need to change it so I am looking for a nice ascii art thing to give back :)
 
@salathe the way you quoted it, it looks like I wrote any any any instead of nyan nyan nyan
 
Mods should be allowed twice the length messages imo :-)
 
1:13 PM
@Gordon maybe you did, and missed the "a" from the start?..
 
user3119231
anyone knows if it is possible to use ajax to give name with file to the server
 
@Maurize yes it is possible.
 
user3119231
I got this situation: I am using ajax to check if player login is valid and stuff. So I don't have any session started. Now I want to upload an file (image)
 
@PeeHaa you need something like this
 
user3119231
Problem: I want to move the file into the users folder -> But how to get his id? / How to give the id with the file to server? ($_FILES)
#
 
1:16 PM
@PaulCrovella E_TOO_MUCH_IMAGE
 
I just wrote some code that tried to access opline->op3 ... I think I'm broken ...
 
@PaulCrovella ty
 
you know you have to translate all those colors into different characters, right?
 
@ircmaxell I can't respond to you.. because you just broke twitter D:
 
1:21 PM
@PeeHaa chris.com/ascii/index.php?art=comics/peanuts I like the Ascii Snoopy with cape, cursing the Red baron
 
hey last thing
why jquery turn my php code into comment?
html comment i mean
 
user3119231
so nobody knows a hoot? :D
 
Morning from BRazil
 
Which bell-end is flagging "shit"?
 
this page has a thoroughly disappointing source
 
1:28 PM
@winresh24 jquery can't control PHP output stackoverflow.com/questions/13840429/…
 
Hmm, was I out of order calling PHP the new Java because of the potential for a void return type?
It's honestly the language that I am instantly reminded of when I hear void
 
hi guys
 
@Machavity lovely
 
@Jimbo imo aything that makes php more statically typed is javafication. but thats not necessarily a bad thing
 
1:29 PM
@rlemon that's giving me a great big old blank page
 
@PaulCrovella needs a webcam. check the source. -- js ascii shader.
 
@Gordon Just making sure that I wasn't going mental and it's not just me :P
 
am trying to figure out a way to output while items are equal to multiples of 3
 
@rlemon ah, shame. got none of those.
 
but cant figure out the right logic
 
1:33 PM
core devs: I understand that compiling PHP with --enable-debug makes PHP slower because -O0, so having that on a production site is undesirable. What about --enable-maintainer-zts? Is that bad for production, too? It sounds like it is in the php internals book but I am not sure. Is it?
also, php.net/manual/en/configure.about.php lists --enable-maintainer-mode but not --enable-maintainer-zts. Is that the same?
 
@GotaloveCode Use the modulus operator :)
This might help:
if (($i % 10) === 0) {
     echo "$i is a multiple of 10<br />";
}
 
@marcio If I were proposing void I would not allow it in union types, whereas null is allowed.
 
yes that was it
thanks Jimbo
 
@Abe No.
 
basics face palm
 
1:40 PM
Note that HHVM allows it but it isn't permitted in the Hack type checker: 3v4l.org/iAAmi. (Take that code and put it into hacklang.org for an example of the hh_client output)
 
@GotaloveCode Mistakes are great - best way to learn
 
and can someone tell me what --enable-versioning is for and whether it has any performance effects?
 
true that
 
@Gordon enable_maintainer_zts ==> turn on thread safety. This is needed if you're going to be using PHP in a threaded environment, i.e. some of the apache workers or with pthreads. Otherwise the extra safety is meant to slow stuff down. I don't know how much.
"--enable-maintainer-mode" - appears to be bogus. I can't see where it's used.....though I could have missed it.
 
@Danack might be a doc bug then
 
1:42 PM
Hey guys, I was hoping to get a little advice if that's ok? A bit of background, I'm building a framework for self-education purposes. I'm trying to figure out the implications of the various decisions you have to make when building something like that.

So I've hit upon two issues that I'm unsure about.

First one is in regards to using a container, I currently have a couple of objects in the main app which I pass around the various areas of the framework. The only objects that I use consistently are a Config object which gets the configuration and the second is Debugbar which tbh I'm go
 
@dops What do you mean by "container"?
 
@Mach
lol sorry
 
@Danack thanks. I take it's not harmful to have in production then
maybe @JoeWatkins can confirm though
 
/yes, that is the joke youtube. Thanks for explaining it.
 
@Machavity I'm specifcally thinking about something like this container.thephpleague.com for dependency injection and the like
 
1:46 PM
@Danack So turning ZTS on will sap your life away?
 
although probably not that exact one, I was going to write it from scratch (again entirely to learn)
 
@Gordon it's not harmful in any meaningful way ... but unless you have a reason to build with thread safety, don't ...
 
@Gordon It slows stuff down, some libraries aren't quite as reliable in ZTS mode, and some stuff just really doesn't play well with it at all, particularly libraries that have their own threading I believe.
As there's no spec of how two arbitrary threading libraries are meant to work together in one application.
 
@Machavity yes, unless it's the other way round.
 
1:48 PM
@Danack which two ?
I'm not sure what you're talking about ...
 
would you expect a monitoring tool to alert you to the fact that php was compiled in ZTS mode?
 
@JoeWatkins PHP with ZTS and ImageMagick with OpenMP enabled crashes on request shutdown. I am too scared to investigate it.
 
that was odd ... @Gordon no, I wouldn't ...
 
@Gordon I would assume most production environments are using a pre-compiled version that's optimized for that environment. i.e. most Linux servers use packaged PHP
I'd have to go way out of my way to find a package with ZTS turned on
 
@Machavity yes, but what if you find one?
@JoeWatkins thanks
 
1:52 PM
@Gordon I can't see where 'versioning' is used in the configure files. Maybe do configure with it enabled and disabled, and compare the two config logs generated?
 
@Gordon Hmm. Good question. In the case of CentOS I'd prolly check for php-zts being installed. But I don't know of a simple way to tell that's been added
 
It could easily be another thing that is legacy and could do with removing.
 
@Machavity checking is simple, it's listed in phpinfo
@Danack thanks
 
@Gordon Ah. Thought you were meaning programmatically. I use DevOps a lot so i tend to think in that vein
 
Hmm, I guess I will just collect that data. Might be useful information for other things, e.g. segfaults happening or something.
 
1:57 PM
mysql rooms are dead right now so i'll ask here. Does anyone know why mysql workbench would be showing 0% key efficiency for my database?
it usually sits around 97% i'm thinking it must be bugged but ive restarted the server and workbench and it still sits at zero.
 

« first day (1825 days earlier)      last day (3133 days later) »