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

12:05 AM
@salathe I don't understand what gettext is, some sort of namespaced hash-table lookup of strings?, basically it can be replaced with <30 lines of code?
 
@Leigh it's a standard to handle i18n. It also has to handle plurals, and is supposed to work for every language on the planet.
 
I thought that's what ICU was for
 
Anyone have a tip for sanitizing/forming a URL from user input? I.e. accept all sorts of junk and try to form a valid url, like take localhost and spit out http://localhost/.
 
@SteveRobbins Sure... tip: Give the user a format and reject the input if they don't follow it.
Don't try and make something sane out of "junk"
 
12:26 AM
@LeviMorrison i guess my voting privileges should be revoked then ;-) :-P
 
@ircmaxell you ever get a chance to see this? chat.stackoverflow.com/transcript/message/22016851#22016851
 
@Rican7 I hadn't, thanks for that
 
12:48 AM
Yes
Thanks!
 
shame traceur feels very heavy, I don't like the runtime thing
 
guys, quick question. is {0,1} safely replaceable by ?
 
Yes
 
cool. thanks @ircmaxell
 
1:07 AM
Facebook Password Storage from Alex Muffett. fast fast fast slow fast http://t.co/r8g6ycVO4y
O_o
 
@ircmaxell I've already seen such things… when they initially had md5… they just rehashed everything and put sha1() around it… and then some other (today weak) crypto and then password_hash() after all that…
 
I have a serious question, do the chats here, maybe this one in particular, become very elitist? I've been thinking about my past experiences with the chat here and I try to take it light, but it seems there has been little good feedback and reception.
I'm not talking about constructive criticism either. I'm just wondering about the purpose behind this chat at all.
 
@Leigh yea, no problem :)
 
@DavidGraham There's a slight problem with group think and people piling on......but the purpose of the chat is to chat, it's not an organised effort at anything.
 
@ircmaxell yea, I figured it might help for some of those conversations regarding the benefits of strict typing
 
1:13 AM
Yes, but stackoverflow tries to have purpose everywhere else
 
Which is to make money for the SO company....I pretty strongly don't agree with some of their policies being 'good' for community. They're clearly just for the benefit of SO.
 
I think stackoverflow's chat could be better if it offered something different than just another random clicky chat.
Making money and going something good are not mutually exclusive
*doing
 
@Leigh Actually it was apt, not yum - serverfault.com/questions/504442/…
 
I'm just saying, I think people come here for good php interaction, which I'm starting to believe doesn't exist here.
 
@Rican7 Zeev dismissed it when I presented it as evidence. So not sure where else to go with it
 
1:31 AM
@ircmaxell I just want to add … I wrote that mail to show you my goals clearly. I don't want to play a political game.
 
2:09 AM
@ircmaxell oh, I didn't even see you mention it yet. So many damn internals emails, haha.
eh, whatever, I'm not sure if Zeev will ever get that argument :/
 
Hello people. You are the third community I will expose my problem to (I first exposed it to the Python and the C++ community). It is a binary flag issue.
I got my binary flags, for instance 6, and I want a list out of it like this: [4, 2]
(Because 6 is 110 in binary, so I would like to extract the two flags 100 and 10)
Apparently there are no magical solutions, you have to loop over it. I came up with something but… I just wondered if you guys could do better.
(The list is to be array_maped to extract the list of messages associated to each flags)
    array_map(
			function ($flag) using($msgs) {
				return $msgs[$flag];
			},
			array_keys(
				# Remove the flags that aren't set
				array_filter(
					str_split(
						# strrev so that the array returned by str_split will
						# have the lowest bit having the lowest index.
						strrev(
							dec2bin($error)
						)
					)
				)
			)
		)
Thanks in advance! I have faith in you ppl. :D
Tell me something better can be done please… for the love of PHP…
 
Good evening!

My site is in chaos right now because we made a better moderation system.
http://www.sudomemo.net/watch/6EE4A0_103B1DF13D2FB_001 describes it best.
xD
 
2:26 AM
@AustinBurk Neat.
 
3:22 AM
@JeromeJ sorry, but I'm on a smartphone at a trainstation waiting for the last or actually the first train of the day so i might be misinterpreting something or missing the entire point of your question? But isnt this simpler? 3v4l.org/pTTRJ Note: You could break out of the loop after the third iteration as 2**n wouldn't fit anymore.
 
@JeromeJ what is this using($msgs)? Don't you mean use ($msgs)?
Also, I don't trust code that uses tabs. =o\
 
3:39 AM
 
4:08 AM
@crypticツ Yes and decbin too instead of dec2bin, sorry about that. What?? PHP too doesnt like tabs or is it just something personal to you?
Btw, I'm stuck with the version 5.4 of PHP. As far as I understand it, I think I can edit your codes to be retro compatible. Thanks bud, let me check both your codes :)
@Ja͢ck PHP_INT_SIZE * 8?
Why times 8? Also, I do think that there isn't a int.bit_length() (from Python) in PHP or, guessing, you would have used it.
 
What's the function that turns variables into stuff like, {s:1:"a"}? I can't seem to remember
:D it's serialize
 
Ah, also just learned that 0b is new in PHP5.4, thanks @Rangad
Is there a way to turn it into an array_map style?
 
4:30 AM
@JeromeJ Bytes -> bits :)
 
@Ja͢ck Ooooooooh
 
hello
need help in php date format
fevereiro 4, 2015 08:00 PM I am getting this string
I want to convert it to date
strtotime not working here.. it gives me 01/01/07
 
@Dharmik fevereiro = february?
 
yes
its in portuguese
 
I see :)
This clarified, I will let the experts answer you!
Might have to do something with the locals…
 
4:37 AM
@Dharmik Have you looked at date formatter?
 
ok, let me try that..
 
0
Q: How to extract specific parts from the array element that contains HTML code and create a new array with this extracted content?

user2839497I've an array of comments titled $comments. The actual array could be huge in size, it may contain hundreds of such elements. For your understanding I've added only 10 elements to it as follows : Array ( [0] => Array ( [text] => Second Comment Added ...

Can some one please help me in my above issue?
 
4:54 AM
@Ja͢ck date formatter gives me blank page, no output
I want to convert "fevereiro 4, 2015 08:00 PM" to "04/02/2015"
 
5:19 AM
Morning
Can anyone help me on this question?
 
5:38 AM
??
What are the alternatives of Extjs ?
 
AAB
5:58 AM
Hi,
Can anybody help me with this
How do I setup url rewriting in xampp?
 
6:17 AM
@Dharmik can't help with blank pages ... do your own debugging.
 
@ircmaxell Teehee
 
AAB
Anyone?
 
user895378
/me embarked on a massive rewrite of all the ext/openssl crypto stream functionality today for php7 ...
 
user895378
Calling it a day at 230am. Catch you folks on the flip-side.
 
nn @rdlowrey
moin all
 
6:32 AM
@rdlowrey later mate
 
Anonymous
7:03 AM
G'dayyyyyy
 
good mornings
 
Anonymous
good afternooons!
 
@AariaCarterWeir there is no afternoon, UGT is the respected time zone here.
that said,
 
Anonymous
7:19 AM
then, Good mornings
 
Anonymous
@PaulCrovella well I learned something new today!
 
Good Mornings
 
Anonymous
Good mornings all.
 
Morning
Pro-question: how to execute a closure under FCGI in parallel? Ideally, without extensions like pthreads.
 
7:34 AM
posted on March 12, 2015 by kbironneau

/* by L0fty85 */

 
@Alexander do you have a magic wand ?? possibly a personal genie ?? or maybe you were granted three wishes by a fairy ??
any of those will do it ...
 
Anonymous
@Alexander sorry can't help you.
 
Anonymous
Brb folks <3
 
@Alexander what are you doing anyway, what's endgame ?
 
@JoeWatkins Some ideas: forks for CLI, proc_open+pipes, background daemons..
 
7:37 AM
@Alexander What are you trying to do? Is non-blocking async maybe enough? If so, have a look at amp
 
@Patrick no, non-blocking IO is not the key
 
what is ?
 
@JoeWatkins this should be async tasks, that I can easily run in parallel from the main web request
 
the only way send send a closure serially is horrible, that's the bottom line, it's not impossible, but the solution would be so ugly, not to mention slow, that you are better to distribute your execution at a level higher than the engine ...
 
@JoeWatkins yes, some dirty tricks can be used too :) I like them
 
7:40 AM
you don't really want that anywhere near fcgi, or the frontend of a web stack ...
it does not fit
 
@JoeWatkins Actually, we have an ActiveMQ and kind of MessageBus, but this is one-way call. No possible and reliable way to get a result from the task. So we put extra synchronization points
 
[z]mq is a separate process from fcgi processes ...
 
@JoeWatkins yes, this is how it's done now
 
this is fine, and sensible ...
 
@JoeWatkins yes
 
7:42 AM
in which case you don't really need fcgi to do anything in parallel, you need to write a php client for the process that can ;)
 
@JoeWatkins however I'm looking for theoretical possibilities to do this more friendly to developers with coroutines and dirty hacks for FCGI
 
a sword can be a beautiful thing, until it stabs you in the face ... it sounds like developers that use it would get stabbed in the face, rather than anything friendly ...
 
@JoeWatkins yeah, but it's a complex thing, not for everyone and requires extra component (*mq)
 
an extra component is fine, nobody complains that they need mysql, mongo, node, or insert buzzword here ...
 
@JoeWatkins yes, it's true fact
I like pthreads extension and have some tests with it. Can it access objects from another thread? (Not Threaded) Want to escape from TLS/ZTS jail...
 
7:47 AM
Morningis
 
good morning
 
good mornings
 
8:09 AM
Anyone know how I can pass a variable from an Iframe to a parent page in PHP? I know how to do this using Javascript. But I need the functionality in PHP
 
@mikeO. PHP runs on the server, not the client...
 
@mikeO. if you how to do it with js than just make an ajax request
@PeeHaa good mornings
if you know how*
 
8:37 AM
PHPMyAdmin has query statistic tab. Where he gets this information?
 
8:50 AM
prepend "explain" to your select statement i guess
 
@sectus I don't use phpmyadmin, bt isn't it just SHOW PROCESSLIST?
 
@PeeHaa , no... it's SHOW GLOBAL STATUS LIKE 'com_%';
 
Well don't you know now where it gets its info?
 
Yes, now I know.
I wonder. SET OPTION is on top of query statistics. 50 per second. VS select 5-10 per second.
 
Happy day-before-Friday :)
 
8:56 AM
aka thursday
:P
 
Can some one please help me in my issue?
1
Q: How to do HTML data parsing using REGEX instead of XML in PHP?

user2839497I've following array titled $comments as follows : Array ( [0] => Array ( [text] => Second Comment Added ) [1] => Array ( [text] => This is the long comment added to check thwe size of the co...

 
@user2839497 You don't
 
morning
 
@user2839497 use DOM
 
morning!
 
Anonymous
9:05 AM
Use simpledom, morning!
 
moni
Competing STH RFC results are... a little surprising.
 
I wasn't following this chat yesterday, Bob's proposal was unexpected!
 
@AariaCarterWeir no, dont. that's a crap library. See stackoverflow.com/questions/3577641/… for alternatives. /cc @user2839497
 
If something has "simple" in the name, don't use it. If it has "dom" in the name and doesn't actually provide the dom api, shoot the author in the face (and don't use it.)
 
Anonymous
haha fair play @Gordon
 
9:19 AM
@nikita2206 I hadn't seen that, interesting. As it stands though, it looks like v5 will pass. Although Zeev opening the vote on coercive presumably extends the vote on it so... youtu.be/E06cNv55jTs?t=44s
 
Anonymous
A long time ago it seemed simpledom was the best option, i guess either I was misinformed or times have changed. I see DOM has been available since PHP5, which begs the question, why did anyone ever bother to write simpledom? haha
 
@AariaCarterWeir For the same reason that SimpleXML exists: people somehow continue to believe that things which are inherently and necessarily complex can be simplified.
 
Anonymous
The DOM docs must have been baaaaad
 
Anonymous
because it doesn't look hard now
 
so .. updated the parts list for my pc
this is the complete setup: pcpartpicker.com/user/teresko/saved/6xk7YJ
 
9:29 AM
@tereško why 2 SSD's ?
 
kinda really expensive, but actually less then was my "limit"
@HamZa raid-0
 
I C
 
because I can :)
 
I got a laptop with 250gb SSD and ~500gb hdd
impossible to do raid :P
 
If the monitor gets delivered tomorrow, then I will be putting it together on saturday
 
9:33 AM
ah nice
 
that means that by monday will be done with overclocking and software
 
Do you even need to overclock with that CPU bulldozer?
 
posted on March 12, 2015 by kbironneau

/* by poney */

 
@tereško Surely that's the one part that doesn't prevent you from putting it together right now?
 
I dont have any backup monitor to plug in
 
9:35 AM
It's not worth the risk IMHO (overclocking)
 
AMDs are meant to be overclocked
 
You buy intel chips for longevity and reliability, you buy AMD chips to squeeze every last little drop out of them
At least, that's how it was when I was building PCs
 
@DaveRandom and then you up the voltage and repeat
 
9:37 AM
Hmmmm ok
I like AMD because of the price/power/quality ratio
 
Then what did I just buy a new Motorola 68030 for? :-)
Ah, yes: fun.
 
@Gordon:I'm in a bit hurry so I'm kindly requesting you to put an answer. I would always be grateful to you. Today is my deadline. So please I'm requesting you. — user2839497 7 mins ago
 
=)
 
hehe
 
#howNotToGetAnAnswerFromMe
 
9:38 AM
AMD chips also have much nicer sounding specs ... you need to divide core count and frequency by two for an equivalent intel chip...
 
@SebastianBergmann Errm... new?? Someone is still making those things?
 
@Gordon Ask him how much he offers for your time.
 
Anyone have any idea how I can do server side speech recognition? I am thinking of maybe trying CMUSphinx but it takes alot of training
 
@DaveRandom Apparently there is plenty of "old but never used" stock. Getting "old but never used" 68030 is easy (and cheap). 68040 and 68060 are apparently bordering on impossible to get.
 
@SebastianBergmann eternal gratefulness
 
Anonymous
9:39 AM
@Gordon sounds legit...
 
@NikiC that's not entirely true.
 
@SebastianBergmann /me checks bank balance
 
@tereško not entirely, but close enough ;)
 
no, I will not be drawn into a flamewar
 
popcorn.png
 
9:41 AM
Intel has hyper threading which is interesting but having (the same amount of) physical cores seems more attracting
 
Anyone remembers Cyrix?
 
@Gordon Yup. They were the ones that built x86 chips without a license from Intel, right?
 
^ I'm too young to know that stuff
 
@SebastianBergmann yupp. I am trying to remember whether I had one of these
 
@JustSteveKing If you don't want to train something yourself, I guess you could use an API like google's
 
9:52 AM
@Gordon I didn't. My first x86 CPU was an Intel Pentium II. Followed by a Pentium 4, IIRC, and then an AMD Athlon 64 X2. Then came an Intel Core 2 Duo and after that my current Intel Core i7. (Talking about my desktop PC)
On the Amiga side of things it was 68000 and 68010 in an Amiga 500 and 68020 in my Amiga 1200. Which I dusted off yesterday and which will soon get an 68030.
 
@SebastianBergmann I still have a working Amiga CDTV in the basement
never had much use for it though
 
It's a nostalgia device.
 
@Gordon The CDTV was not really useful. The CD32 was a much better attempt at making a game console.
 
name drop time: my first x86 box was pieced together from a bunch of Joe Celko's spare parts for me as a gift from his wife Jackie.. didn't realize at the time what I'd get into with it.
or who he was
 
OH: "Desired: Understanding of and aversion to SOAP" https://getfinal.com/jobs/fullstack/ @final
:D
 
10:05 AM
morning
 
@Gordon neat, that accounting class I took and my seething hatred of SOAP may finally pay off
 
I'm currently running an ajax functionality, and on success, I want to call a PHP function. Here's my code
successCallback : function(reply)

<?php php_func(); ?>

},
 
oh wait, Ruby... screw that noise
 
problem is, the PHP function gets called immediately, without waiting for the ajax code to complete. Any one got any idea how to make it wait until the javascript successCallback executes?
 
@mikeO. I strongly suggest you to read how server-client works.
 
10:09 AM
Good morning
 
Morning, @AlmaDo
 
Anonymous
good morning
 
can someone explain why pcntl_signal(SIGTERM, [$handler, 'handle']); works and $signal = 15; pcntl_signal($signal, [$handler, 'handle']); doesn't ?
but.. why?
 
@mikeO. by the time your Ajax gets executed on the client, the PHP code was long executed on the server. See stackoverflow.com/questions/2379224/… for an explanation.
 
Anonymous
@mikeO yeaahhh, that's not how AJAX works
 
10:12 AM
@mikeO. Learn about the difference between server and client side
 
looks like pcntl_signal() can not accept anything, but constants.. huh?
 
@AlmaDo What does the lxr say?
 
@Leri it doesn't matter, I just need to set up signals by map dynamically
tried many ways.. still failing
bullshit
 
102
Q: What is the difference between client-side and server-side programming?

decezeI have this code: <script type="text/javascript"> var foo = 'bar'; <?php file_put_contents('foo.txt', ' + foo + '); ?> var baz = <?php echo 42; ?>; alert(baz); </script> Why does this not write "bar" into my text file, but alerts "42"?

 
@AlmaDo What exactly does it say? I'll have a look at implementation, might get some hint
 
10:18 AM
if (php_signal4(signo, pcntl_signal_handler, (int) restart_syscalls, 1) == SIG_ERR) {
    PCNTL_G(last_error) = errno;
    php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error assigning signal");
    RETURN_FALSE;
}
^ mine
 
@Patrick I don't mind training it so much - but I am just trying to create an online dictation tool really.
 
"just"
 
@PaulCrovella I know ahaha
I was thinking maybe using bash to open a chromium window and feed the mp3 through the google voice api
but it feels like cheating
 
@JustSteveKing What's wrong with cheating?
 
@PeeHaa If you want to do something, you should do it properly. That is the way I see it
 
10:22 AM
@AlmaDo I doubt this unless you pass wrong int arguments.
 
I have looked at CMUSphinx but it always has issues on the instal
 
Also, wtf, callable|int. lol php
 
@Leri but this is the case for me ..
 
@Alexander no, and you don't want it too ...
 
@JustSteveKing you can use the api directly without going through chrome I think
 
10:24 AM
@Patrick But google limits the requests which is the issue
 
@AlmaDo hmm. Did you try passing closure as the second argument?
 
@Leri it doesn't matter
 
Hey, I have currently a php class with a constructor.
 
because same code (callable) works with pure constants
 
How can I easily create a module where I put watermarks on images? With ImageMagick?
I have a few variables available with the image path in the class.
 
10:27 AM
@AlmaDo But function parses anything that is passed to long, so it does not matter. Are you sure that var_dump($signal === CONST_YOU_WANT) returns true??
 
@JoeWatkins why not? If it's c/c++ code I can do this easily, accessing structures and objects between threads with appropriate sync. code. If I need separate instances, I can use TLS. From version 7, PHP will use TLS too instead of ugly TSRM macros. So, it should be possible to keep objects between threads without duplication/serialization.
 
Selamlar P.H.Peeps! I've got a question that doesn't fit SO very well but maybe somebody can point me to what I'm missing. I'm an old school PHP programmer. I was very fluent with the language through the 3 and 4 days. Yes I contributed to some of the crappy PHP code that has plagued the web since, but I also (trial by fire) got the hang of it and made it do some really nice stuff. But I've been out of the game for years.
I'm now looking at refactoring a couple of apps and am interested in refactoring them into more modular setups, probably using ZF2. On the one hand I like what I've read about it, on the other hand I'm having a problem with some of the paradigm shifts that have happened. I feel like I'm still hanging onto the wrong end of the snake. I've worked through things like the Zend Skeleton App tutorial, the blog tutorial, and a handful of others on the web.
Those all make decent sense as far as they go, but it seems like they are very basic and while I can make any one part work, I'm not "getting" the picture here when it comes to fitting my app in an MVC architecture. Are there example apps out there that are a bit more fleshed out? Something more that single module/function/view site that shows how various things interact in real life?
 
@Caleb woah? :D
 
@Alexander appropriate synchronization is provided on threaded objects, it would obviously be dangerous to allow you to access any object without synchronization
 
@JustSteveKing I'm all for cutting corners and focus on things that make money :P
 
10:30 AM
@PeeHaa I would do if it was about just making money. I want to make something useful - not just another shortcut
 
PHP has always used TLS, that hasn't actually changed, we still use TSRM, but have eliminated the need to pass around the base address of TSRM storage ...
 
@JoeWatkins can you add this Danger(tm)Threaded class?
 
@Caleb It may just simply be that it doesn't fit. What actually is the application in question?
 
@Alexander no
 
@Leri looks like something is odd
SIRTERM is registered while SIGKILL isn't
 
10:31 AM
@Caleb IIRC the symfony framework had a very lengthy (24 parts?) tutorial about building a complete blog software in symfony 1... while sf1 is outdated it might give you some more ideas...
 
Anonymous
Okay folks! That's me away. night all
 
@Caleb MVC and PHP don't mix well. See ircmaxell's blog post series (It's multiple posts)
 
@PeeHaa Spoken like a true business man :-P
 
@JoeWatkins this related to your vision, that userland developers can't do this correctly? Right?
 
they can't, it's not just my imagination, not enough internals are available to userland to do it reliably, think about references ...
 
10:33 AM
Of course, zval reference increments/decrements can bring a lot of paing with multithreaded shared objects, but I see a real power (examples from Python) for future code
*pain
 
the model is shared nothing, not going to fight it ... nor should anyone else ... it is a loosing battle ...
 
@DaveRandom It's not rocket science. Here's a page. Just a bunch of text reading, marking and comparison tools with various views into the data.
 
@DaveRandom ;-)
 
@JoeWatkins I think, that you too pessimistic about it )
@JoeWatkins but I still like the behavior of pthreads ) And this can be a good addition for the PHP core in the long time distance...
 
@AlmaDo Maybe sound stupid but.. did you try (int)$signal?
 
10:37 AM
guys any interesting link about php7
 
@DaveRandom It seems like it would be the king of thing an MVC architecture would handle. A bunch of data (half static, half user contributed dynamic) and a bunch of different ways of arranging and looking at the data and a few views that modify some of it.
 
@Leri well, no, I found other thing. it's about - for some reason I can't register SIGKILL, but can SIGTERM, but, after registering SIGTERM, it does not execute code of my handler
any thoughts why? callback is fine
 
@Alexander I don't think it is even possible to implement due to, f.e. circular reference detection that would not work with shared zvals
 
you spelled realistic wrong
I don't think it'll be going in core either ...
 
@Caleb read the post that I linked
 
10:39 AM
@nikita2206 global objects reference list? (for threaded objects)
 
\o/ moar yes votes on the sane scalar rfc!
 
@Patrick Already there....
 
@nikita2206 atomic increment/decrement for counters
 
@DejanMarjanovic <3
 
@PeeHaa still worryingly close ...
typical would be ending up with nothing ...
 
10:41 AM
@AlmaDo It does not signal?
 
@Leri in handler there is a call to logger, but entries are not in log file. And, also, in handler for SIGTERM there is exit() obviously, but process isn't terminating after registering SIGTERM ..
 
> 1. Put this one for a vote before the end of tomorrow. Here too, on a
personal level, if I see that this proposal isn't gaining enough votes,
I'd support the dual mode one.
 
@Leri heh, found why.
 
before tomorrow ...
because, fuck rules, I guess ...
 
@AlmaDo And why?
 
10:51 AM
@Leri xdebug
 
lol
I hate when such simple things waste my hours.
 
@Patrick Okay I've read it. And it makes a ton of sense but it's nothing I don't know. I know an aweful lot about programming on the web and the state vs. stateless issues it brings with it. And I understand why MVC just doesn't fit that in some respects. So for the moment forget that I used the four letter word MVC — my question still stands.
ZF2 uses several different ways of separating various concerns from each-other (which is what that article ends with) and that's what I'm trying to do. But it's still the framework itself is still strangely opaque and I feel like I must me missing some set of documentation or examples that would demystify it some if I were to dig through them.
 
> And that
dual-mode RFC is re-incarnation of the register_globals, just in a
different way. But essentially will make the same mess.
I want Zeev to stop now ...
@ircmaxell make him stop ...
 
@Caleb I don't think it's supposed to be easy. Otherwise who would need their certifications? ;)
 
@JoeWatkins Zeev didn't write that one ;)
 
10:56 AM
@Caleb But I don't think I can help you here. I never used Zend Framework.
 
oh yeah so he didn't ... my bad ...
 
@Patrick That's pretty lame, and part of the problem, not a solution. I feel like I'm playing with some enterprise black box that doesn't come with the docs to use it unless you take their cert course. I have a few myself and they are useless—I'm also not a newbie to the field and have a few programming experiences under my belt. In the case of an OSS framework I kind of expect there to be some projects out there that have large code bases to be picked apart or some decent documentation.
 
@Caleb This is precisely what caused me to close that particular book and never pick it up again. I do not like ZF2. And to answer your next question: no, I don't have a recommended alternative. While I have a lot of regularly used modules for various tasks I don't have anything you'd call a "framework" that I use, I basically just wire a bunch of stuff together in new and interesting ways for each project.
@Caleb what makes you so keen on using ZF2?
 
+1 for just using components and not a full blown framework (obligatory tutorial link)
 
11:07 AM
@DaveRandom I've done much the same thing --- and have a ton of code I've re-used in various ways. But it doesn't take good advantage of newer OOP language features and it needs a serious refactor. In particular there are a few pieces that I see have been implemented well in various modules (e.g. User Auth) that I'd just assume not re-invent the wheel on. Again.
Using the best framework I can think of as a starting point and refactoring my stuff into modules as I go seemed like the best way to move forward, and ZF2 seems like the best framework to start from, partly because so much of it can be used or ignored at will.
 
@Caleb instead of using frameworks, you can rely on components. There are nice components in Symfony, Aura, etc.
@Caleb framework will restrict your architecture and this can be an annoying thing. Components are just tools for specific cases and can be added only when needed.
 
@Caleb You could just pick out those specific modules, you don't need to use the whole thing afaik
 
11:30 AM
morning
 
@Alexander What component is nice of symfony?
 
@PeeHaa For example, symfony/console or symfony/dependecy-injection...
@PeeHaa check all available components here: symfony.com/doc/current/components/index.html
 
@Alexander Why does it have a get method? The injection thing?
@Alexander I am using the http foundation in a project and I regret it everytime I look at it
 
@PeeHaa http foundation is awful :)
@PeeHaa so, I'm not recommended it for you )
 
morning
 
11:46 AM
@PeeHaa It really doesn't harm you if you only use it as a DI
 
morning
 
@PeeHaa I know that feel... :(
 
hello ,
i developed an internal web application for my company
i am beginner in PHP so i want to know if i did the job right or there is a better way

i classified all my code to functions and create a page called functions.php that has about 20 function
then i include this file to all other page
the app worked fine but Is that True ?? or there is a better way to do ??
 
no you didn't, and yes there is a better way
 
what is it ?
 
11:52 AM
depends what you're doing. If it's an actual application (not just a website with some PHP funcs printing out stuff), the thing you want is called "object oriented programming"
if it's more along the lines of a website, you probably want a CMS of some sort that's built by people who have been doing the PHP thing for longer (Wordpress, Joomla, and Drupal are the big 3)
 
i have a basic understanding of oop
but my application is about tool that read excel files and represent it on a chart
does that need oop ?
i don't want to use any cms
i am asking about Core PHP .
 
49 mins ago, by Patrick
+1 for just using components and not a full blown framework (obligatory tutorial link)
 
^ thanks :)
 
(I actually don't think that is useful advice to give someone starting out.....there is too much stuff to learn at once.)
 
He already built an app that works
 
11:57 AM
@Bassem I would suggest using Symfony or Zend Framework 2 to make your first applications. Even though they're not perfect, learning to use them will teach you a lot of patterns that are useful in web development.
 
@Bassem you can do the same things (mostly) in a procedural fashion that you can in an OO fashion, although just creating function files has severe limitations that you'll hit rather quickly
 
@Danack I think those frameworks are much harder to learn than building something from scratch.
 
^^ true
 
Maybe something smaller like silex would be better, I don't know. But zf and sf are not exactly known to be easy
 
@Patrick Learning stuff from scratch is fine, so long as you can throw it away and restart. When you're writing applications for a company, that isn't possible.
 
11:58 AM
@Patrick only because you have to learn someone else's style and organization (which is a skill in its own right)
 

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