« first day (1626 days earlier)      last day (3327 days later) » 

10:00 PM
Yep :)
 
@LeviMorrison Well one design method is to have some users out there... .
 
So quick question, what's the best way to get a users ip? Is $_SERVER['REMOTE_ADDR'] really the best way to go?
 
It's not easy to have a library of such basic types that is somewhat stable I have to admit. I for myself have not solved that problem yet.
I feel it's with having a minimal design. I like that you've kept these tickets open so to see at which points you kept chewing on. I have to admit I couldn't answer all of them for sure for me. Most easy was the one about retaining keys or not.
@Purify not if it's not set.
 
I'm kinda curious how someone like tinder or foursquare get your location then...
 
@hakre I think I am going to have a radically different design eventually.
That's one reason I haven't pushed for a stable release.
 
10:06 PM
Maybe I should go remote_addr with a fallback of html5 geo.
 
168
Q: What is the most accurate way to retrieve a user's correct IP address in PHP?

cballouI know there are a plethora of $_SERVER variables headers available for IP address retrieval. I was wondering if there is a general consensus as to how to most accurately retrieve a user's real IP address (well knowing no method is perfect) using said variables? I spent some time trying to find ...

 
Hey guys , what is more efficient , to get an array of rows from DB , and than arrange them by TIMESTAMP locally , or by the SQL statment itself just order it by TIMESTAMP?
 
@HamZa I saw that. Seems overkill.
 
@roimulia do it in SQL
 
Seriously it's more efficent than do it locally?
even if its 1k rows
 
10:08 PM
@Purify then using $_SERVER is the way to go
 
@HamZa awesome, thanks.
 
@HamZa
 
@LeviMorrison Interesting. I like radical ideas.
 
Nothing to do with efficiency. It's about sanity and delegating computing load to the sql server.
If you want to know which one is faster then I suggest to benchmark it.
 
10:11 PM
@LeviMorrison You only don't want to take care of maintenance :)
 
k ill check it out
and heres a hard question im banging my head off haha
 
hey, @LeviMorrison shouldn't this include namespace segments? github.com/php/php-src/commit/… (if I overlooked the patch, nevermind)
 
9
A: is php sort better than mysql "order by"?

JALYou're comparing a system with methods implemented in optimized C, meant to do exactly this task, with another that you are going to implement in an interpreted scripting language. Basically, anything written in C is going to be a lot faster than an equivalent function written in PHP, by a facto...

 
Instagram facebook twitter etc , can calcualte the times passed since someone shared post or images
 
Confirmed my thoughts...
 
10:12 PM
if i want to do the same , should i use DATETIME or TIMESTAMP?
 
@HamZa as if the sorting functions in PHP aren't written in C :O
 
actually thats intersting
In theory , if when ever i insert a new row to the DB , in the last index , and the TIMESTAMP/DATETIME will automatic get the current time , my db will be organized?
 
@marcio If it's just a namespace segment I believe it is okay.
 
@roimulia You will have a problem when year 2038 comes if you use timestamp :P
 
haha
I can live with that :D
but seriously, im working on a huge app
social network
 
10:16 PM
The Year 2038 problem is an issue for computing and data storage situations in which time values are stored or calculated as a signed 32-bit integer, and this number is interpreted as the number of seconds since 00:00:00 UTC on 1 January 1970 ("the epoch"). Such implementations cannot encode times after 03:14:07 UTC on 19 January 2038, a problem analogous to the "Y2K problem" (also known as the "Millennium Bug"), in which 2-digit values representing the number of years since 1900 could not encode the year 2000 or later. Most 32-bit Unix-like systems store and manipulate time in this "Unix time...
 
@NikiC The way this is worded:
-Fatal error: "int" cannot be used as a class name in %s on line %d
+Fatal error: Cannot use 'int' as class name as it is reserved in %s on line %d
 
I was serious :)
 
im great at swift and xcode and all of that , and good with php , but now im taking eveything cancluated
lol @HamZa nice i think in that year ill lean back and enjoy my money :DDD
 
I think I preferred the former. (but thanks for doing this, by the way)
 
I'd rather do it the right way if possible :)
 
10:18 PM
@HamZa , To get relative time (how much time passed since x) , Sshould i use timestamp or nsdate?
 
Also this looks kind of funny: Fatal error: Cannot use 'bar\int' as class name as it is reserved in %s on line %d
bar\int is a reserved class name? :)
 
42
Q: PHP & mySQL: Year 2038 Bug: What is it? How to solve it?

DevnerI was thinking of using TIMESTAMP to store the date+time, but I read that there is a limitation of year 2038 on it. Instead of asking my question in bulk, I preferred to break it up into small parts so that it is easy for novice users to understand as well. So my question(s): What exactly is th...

 
@LeviMorrison just to be sure we are on the same page, Something\Int\Something is allowed?
 
^ always be prepared
 
@roimulia nsdate, isn't that swift or something?
 
10:18 PM
@marcio I believe so.
(not 100%)
(maybe 80%)
 
@HamZa my bad . DateTime
 
@marcio The FQCN isn't "Int", so why shouldn't it be allowed? When the PHP file is parsed maybe?
 
@hakre Reading the accepted answer. I would convert the date to UTC and store it as DATETIME. When I need to retrieve and display the time/date, I add/substract the timezone offset to/from it. What would you do?
 
@HamZa Practically, I would take care that the OLSON Tables are properly installed with the Mysql instance and then do the timezone conversions if needed.
 
3v4l.org/aTo6V array isn't allowed
 
10:22 PM
@LeviMorrison I think that's bad as we allow namespace aliasing too.
 
@Worf That's a different case I think.
 
@marcio Can you provide a demo?
 
@hakre oh interesting. TIL
 
for instance:

use A\B\C as D;
new D\C\E;

PHP Fatal error: Class 'A\B\C\C\E' not found in Command line code on line 2
 
@HamZa I got it from some Mozilla blog: blog.mozilla.org/it/2012/11/16/…
 
10:24 PM
@HamZa so what are you thinking?
 
having namespace A\Int\B; implies that you would/could have namespace A\Int; as well, which would be unreachable for obvious reasons
 
@roimulia I'm thinking about either going to sleep or resuming viewing some python tutorials :)
 
if we are going to reserve, better reserve everywhere to avoid inconsistencies as Int wouldn't be allowed in the end of a NS alias anymore too.
 
haha
 
@Worf exactly!
 
10:25 PM
@HamZa or :D you can help me via skype and ill share my knowledge on things im goof at like swift marketing and promoting :D:D
 
I'm a student. I don't need marketing, neither promoting...
On a serious note, read the two links @hakre shared here
 
@hakre it's not a different case... ok reserving array everywhere was caused by parser generator misuses, but reserved words should be consistent as much as possible.
 
haha @HamZa i will check it out , but im banging my head over alot of stuff
I mean like thing about that , if you have facebook ,instagram it looks like they load each post or image everytime it needed to be open
 
@roimulia break it down in little pieces and process it one by one
 
so my question is how in instgram , they are downloading one image each time
 
10:30 PM
@marcio reserved word should be reserved in a certain context and not necessarily on string level.
that we have T_ARRAY in PHP is somewhat historically with the parser. I'm sure @NikiC can explain this better, but I wouldn't so much argue with logic on reserved words in PHP.
:)
@roimulia that sounds more like a statement than a question.
 
lol
 
i agree with that @marcio also, the benefits just don't justify the effort required from php (in terms of performance) to allow the reserved words only in some conditions
 
@hakre I'm just trying trying not to make things even worse because this would create even more obstacles later if we try to fix this in some way (I'm trying fix that)
 
@Worf that's not necessarily a question of performance I'd say.
 
@hakre , i meant , is it possible to "echo" row for the DB and load it on the app while more images are being "echo" from the server? so you can keep the user exprience flow?
 
10:34 PM
I'm not in a position to give you an (authoritative) advice. This is just an opinion:
I usually do not compare to FB, insta or twitter. It doesn't make sense. The user base, the network, the infra is on a whole other scale.
Asking "how they are doing it" is likely not going to give you a full answer since it's how they make money. Also, you probably do NOT need such a complex design even if it was available.
 
not speaking of the hard implementations that could be avoided - just like traits aliasing basically - which constantly lead to bugs
 
@marcio Can't remember -- were you working on enums?
 
@roimulia your question is unclear. What's "an app"? Android/iOS app? Website?
 
IOS App
im making an app
 
@Andrea You worked on enums briefly, yes?
 
10:35 PM
i'd allow reserved keywords only when there's no chance of ambiguity at all, like $obj->array()
 
that suppose to go very viral
@HamZa @hakre so im worried about those stuff
 
I wish I had the foresight to reserve enum as well >.<
 
@roimulia don't worry be happy.
 
@roimulia I guess you're looking for multithreading
 
@LeviMorrison fail! :D still i bet Enum is widely used, would break lot of code, no?
 
10:37 PM
@LeviMorrison I wonder when it starts with ISomething and IThen.
 
@LeviMorrison nope -> @Andrea
 
@Worf If Enum is widely used, it should be easily replaced with the real Enum when in core. :)
 
eh, not really @hakre
 
wow, can we stop the reserving words frenzy please ^^
I wonder if there is a way to have new types without conflicting with class | function names
 
@marcio I want to propose enums for 7.1/8.0.
I have a partial implementation already.
 
10:40 PM
@LeviMorrison what will they feature?
 
@Worf no not really. But from a design perspective it would be interesting. Enum in core should be preferrable over any user-space implementation.
 
 - Use `Color::Red` syntax (no property/method magic)
 - Can use them in type checks, meaning `function f(Color $color){}; f(Color::Red);` works as expected
 - Can use them in switch cases
 
@LeviMorrison that's cool, any chance to have it inside a ns? php\enum or something?
 
@marcio Absolutely not, lmao
 
are them regular classes, right? like i can add methods to them?
 
10:41 PM
@LeviMorrison I tried :D
 
enum Color {
    Red
}
 
@HamZa i will look it up , maybe can i hire you for consulting? and pay you fair price for your help?
 
^ that will need to be a full-on reserved word.
Not like how we've reserved true, false, etc.
 
Color::Red->isDarkerThan(Color::Blue)
 
@roimulia haha no. I'm not that experienced yet
 
10:42 PM
A few other things for enums:
 
@LeviMorrison will it have iota?
 
@HamZa , but you are more than me :) comon lets give it a shot
 
  - `Color::values()` to get an array of all the values of the enum
  - Supports comparisons, since there is a natural order to enums
 
max , you will share you knowledge with me and ill greatly accept it
haha
 
enum DayOfWeek extends WorkDay, WeekendDay{} ?
 
10:43 PM
Enums are final.
(For the record I think they are final in every language that has them)
 
yes. but why not?
 
I'm not going to pioneer non-final enums, sorry.
 
:P ahahah
just saying
i don't see why they shouldn't
 
@HamZa what do you say? :)
15min thats all i need
 
@roimulia not interested sorry. I need to do a lot of homework.
 
10:46 PM
kk @HamZa :) GL!
 
GN room11
 
i think they are final in other languages because child enums would have to reassign values:
enum A{ C = 1; D = 2; E = 4; }
enum B extends A { F = 1; G = 2; H = 4; }
and that wouldn't be possible to use as key in collections, in enumsets, etc @LeviMorrison
basically B should check if values aren't taken already by ancestor enums
so yeah, final makes sense
@LeviMorrison what about methods?
 
@Worf Initially probably not.
Maybe later. Maybe.
 
good, good :P
 
I've used methods on enums in Java and I neither liked nor disliked it.
 
10:57 PM
@HamZa , did you went yet?
@hakre hakre, how about what i suggested to hamza?
 
Anonymous
@roimulia you can hire me :)
 
@sam_io skype me :) roimulia
(two users are me haha)
 
@LeviMorrison (i'm following you on github, we had a talk before) designing the exception hierarchy is tough, eh? :D
after years of attempts i still have no clue about it
 
:)
I have had significantly more success with data structures and algorithms than I have with the exception hierarchies.
Fortunately they are more important as well, so that's fine :)
 
Anonymous
@roimulia lost track of your request. I am only familiar with php
 
11:10 PM
@sam_io familiar or good?
 
Anonymous
Both
 
@LeviMorrison luckily :D
 
so add me
i need assistance from the server side
@sam_io roimulia skype moi
@sam_io added?
 
Anonymous
@roimulia nice trolling
 
@sam_io dude im serious
lol
 
Anonymous
11:24 PM
@roimulia the why don't u respond?
 
i have not gotten any request
Its my interest for you to add me , im not playing around
did you add me? there is too users with this name
 
Anonymous
I sent like 8 min ago
 
both me but diffrent accounts
email me your skype muliastudios@gmail.com
 
Anonymous
Nahh good luck on you endeavours
 
lol now im thinking you are trolling me
well good luck anyway sam
 
Anonymous
11:27 PM
Ramat gan
 
Anonymous
I don't troll
 
-2
Q: My PHP echos are not showing

Rud0lphI just started developing a new website and Im implementing a MySQL database into it. But Im having some problems with the PHP. Firstly, the PHP code is being ignored by the browser I use, have used Chrome and Firefox and no change. When I inspect the elements inside the browsers the PHP sectio...

 
well thats wierd as hell
 
Yes, that browser script derived from ECMA. PHP, they call it.
 
look i got thing
nothing
 
Anonymous
11:30 PM
@roimulia give me a general idea about ur project
 
@social network
Thats why i need php guy , to help me handle effcient etc etc etc
Set up correct DB
 
Anonymous
@roimulia what are the features?
 
i cant talk about the app
 
@roimulia As I'm also experienced in the business side of startups: what's your starting capital and how are you going to make this popular (never mind profitable)
 
Anonymous
And why not use humhub?
 
11:32 PM
If your answer isn't well planned out, goto fail;
 
@sam_io i cant talked about the app because the concept is kinda private lol , but it all about transfar data , not more
 
Also: free coffee and beer for the people who make sure the class-name reservations are case-sensitive so we don't have arbitrary class name restrictions despite having a context-sensitive lexer in php7
 
@Amelia , im answering very basic and relevant physiologic need + I'm building it in the most simple and intuitive design making the user experience to fun
 
Anonymous
@roimulia go to 10minutemail
 
I really belive in this one , im superbe when it comes to UX and build apps
but i really need to take it 1 step further for this app..
(SS as well lol)
g732944@trbvm.com
 
11:36 PM
@roimulia this is a chatroom for PHP devs, not a hiring platform...
 
I know
but one thing lead to another lol
 
Anyways, night people~
 
@Amelia nIght
@sam_io
g732944@trbvm.com
 
Anonymous
@roimulia sent already
 
prntscr.com/6nhzg0 wth is going on lol
 
Anonymous
11:40 PM
Refresh
 
did still nothing ill wait 2 more min
 
Anonymous
:)
 
@sam_io for the past 3 hours im trying to load data asynchronously
This is so frustrating i wanna die
 
Anonymous
Check your email
 
Anonymous
muliastudios@gmail.com
 
Anonymous
11:43 PM
^^
 
added
 

« first day (1626 days earlier)      last day (3327 days later) »