Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2870 connectés 

 


 Mot :   Pseudo :  
  Aller à la page :
 
 Page :   1  2  3  4  5  ..  839  840  841  ..  1454  1455  1456  1457  1458  1459
Auteur Sujet :

blabla@web

n°1929748
Dj YeLL
$question = $to_be || !$to_be;
Posté le 07-10-2009 à 15:25:08  profilanswer
 

Reprise du message précédent :

FlorentG a écrit :


Y'a des chiottes style getimagesize


 
S't'un euphémisme ça ...
 
Une fonction "getimagesize" qui retourne plus que la taille de l'image, j'aime. Bientôt un getfileextension qui te retourne aussi sa taille et sa date de dernière modification ...


---------------
Gamertag: CoteBlack YeLL
mood
Publicité
Posté le 07-10-2009 à 15:25:08  profilanswer
 

n°1929752
masklinn
í dag viðrar vel til loftárása
Posté le 07-10-2009 à 15:35:17  profilanswer
 

FlorentG a écrit :


Y'a des chiottes style getimagesize


Putain mais halp la "valeur de retour", c'est un mix entre positionnel et keywords [:ciler]

 

[faux edit]: j'avais jamais lu la doc, mais c'est du grand n'importe quoi cette fonction en fait, oscour [:pingouino]

 

vrai edit: sarace le list() PHP ça slice en plus, si tu lui donnes 3 noms et que l'array fait 15 éléments ça prend les 3 premiers et ça balance le reste [:pingouino dei] Et si l'array fourni est trop petit il fait quoi, il met les variables en trop à null [:pingouino dei]

Message cité 2 fois
Message édité par masklinn le 07-10-2009 à 15:36:47

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1929756
skeye
Posté le 07-10-2009 à 15:38:14  profilanswer
 


 
[:delarue5]


---------------
Can't buy what I want because it's free -
n°1929760
masklinn
í dag viðrar vel til loftárása
Posté le 07-10-2009 à 15:40:25  profilanswer
 


Et maintenant dans getimagesize:
getimagesize ne trouve pas la taille de l'image, c'est pas un échec, il renvoie $w=0, $h=0
getimagesize retourne le nombre de canaux couleur de l'image, sauf quand il veut pas
getimagesize retourne la profondeur de couleurs de l'image, sauf quand il veut pas
getimagesize formatte la taille de l'image pour inclusion dans un <img/>, parce que sinon c'est dûr


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1929761
FlorentG
Posté le 07-10-2009 à 15:40:31  profilanswer
 
n°1929762
masklinn
í dag viðrar vel til loftárása
Posté le 07-10-2009 à 15:41:46  profilanswer
 


Pouvoir ignorer des valeurs explicitement ça me gène pas, c'est bien pratique :o (bon après dans ton exemple précis c'est un peu bête [:petrus75])
(j'vois pas le pourquoi du explode sur un array par contre, c'est pas $str plutôt que $array?)


Message édité par masklinn le 07-10-2009 à 15:42:50

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1929763
skeye
Posté le 07-10-2009 à 15:42:00  profilanswer
 


:D
 
Non mais je suis d'accord avec toi sur le coup hein.[:joce]
Ils justifient certainement la non-utilisation des exceptions dans le langage lui-même par je ne sais quelle retrocompatibilité de mes deux, mais c'est franchement crétin d'ajouter le support des exceptions sans les utiliser systématiquement au lieu de péter des erreurs dans tous les coins...:o


---------------
Can't buy what I want because it's free -
n°1929764
skeye
Posté le 07-10-2009 à 15:42:44  profilanswer
 


 [:lol wut]


---------------
Can't buy what I want because it's free -
n°1929767
FlorentG
Posté le 07-10-2009 à 15:45:19  profilanswer
 


Bulletproof getImageType :

Code :
  1. function getImageType($file)
  2. {
  3.  if(($infos = @getimagesize($file)) === false) {
  4.    return null;
  5.  }
  6.  return $infos[2];
  7. }


[:dawa]

Message cité 2 fois
Message édité par FlorentG le 07-10-2009 à 15:45:49
n°1929770
masklinn
í dag viðrar vel til loftárása
Posté le 07-10-2009 à 15:47:37  profilanswer
 

FlorentG a écrit :

Code :
  1. return null;



 [:cerveau sadnoir]


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
mood
Publicité
Posté le 07-10-2009 à 15:47:37  profilanswer
 

n°1929773
skeye
Posté le 07-10-2009 à 15:49:07  profilanswer
 


Les exceptions c'est le mal en php on te dit [:joce]


---------------
Can't buy what I want because it's free -
n°1929774
masklinn
í dag viðrar vel til loftárása
Posté le 07-10-2009 à 15:49:13  profilanswer
 


Heuu pourquoi quelqu'un utiliserait each dans ce cas précis [:pingouino]
 
Ya besoin ni de each ni de explode, juste de list(,,,,,,,,,$whatever) = $array non [:pingouino dei]


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1929777
skeye
Posté le 07-10-2009 à 15:50:27  profilanswer
 

masklinn a écrit :


Heuu pourquoi quelqu'un utiliserait each dans ce cas précis [:pingouino]
 
Ya besoin ni de each ni de explode, juste de list(,,,,,,,,,$whatever) = $array non [:pingouino dei]


Ya besoin ni de l'un nio de l'autre, ya besoin d'acheter un cerveau et d'utiliser la syntaxe tableau.[:dawak]


---------------
Can't buy what I want because it's free -
n°1929778
masklinn
í dag viðrar vel til loftárása
Posté le 07-10-2009 à 15:50:34  profilanswer
 


 [:cerveau julian33]  

skeye a écrit :


Les exceptions c'est le mal en php on te dit [:joce]


 [:cerveau sparta]


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1929779
Dj YeLL
$question = $to_be || !$to_be;
Posté le 07-10-2009 à 15:50:42  profilanswer
 

masklinn a écrit :


Putain mais halp la "valeur de retour", c'est un mix entre positionnel et keywords [:ciler]
 
[faux edit]: j'avais jamais lu la doc, mais c'est du grand n'importe quoi cette fonction en fait, oscour [:pingouino]
 
vrai edit: sarace le list() PHP ça slice en plus, si tu lui donnes 3 noms et que l'array fait 15 éléments ça prend les 3 premiers et ça balance le reste [:pingouino dei] Et si l'array fourni est trop petit il fait quoi, il met les variables en trop à null [:pingouino dei]


 
Non, il te claque une erreur dans les dents :o (Undefined offset: 5 ...)
 
(et pour info list ne fonctionne qu'avec des tableaux à indexes numériques, un list($nom, $prenom) = array('nom' => 'Durand', 'prenom' => 'Pierre') te pète aussi à la gueule)


---------------
Gamertag: CoteBlack YeLL
n°1929780
masklinn
í dag viðrar vel til loftárása
Posté le 07-10-2009 à 15:51:32  profilanswer
 

skeye a écrit :


Ya besoin ni de l'un nio de l'autre, ya besoin d'acheter un cerveau et d'utiliser la syntaxe tableau.[:dawak]


Oui mais la syntaxe tablal, tu peux pas l'utiliser sur une fonction si?

 

Genre

Code :
  1. $whatever = explode($string)[3];


c'est pas illégal en PHP?

Dj YeLL a écrit :

(et pour info list ne fonctionne qu'avec des tableaux à indexes numériques, un list($nom, $prenom) = array('nom' => 'Durand', 'prenom' => 'Pierre') te pète aussi à la gueule)


L'inverse me choquerait pas mal :o

Message cité 3 fois
Message édité par masklinn le 07-10-2009 à 15:52:03

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1929781
FlorentG
Posté le 07-10-2009 à 15:51:40  profilanswer
 


En fait ouais elle est naze ma fonction [:sadnoir] Remarque j'ai dû écrire ça en 2006, j'étais encore jeune [:sadnoir]
 
 
J'veux pas d'Exception à cet endroit-là [:sadnoir]

n°1929782
masklinn
í dag viðrar vel til loftárása
Posté le 07-10-2009 à 15:52:42  profilanswer
 

FlorentG a écrit :

J'veux pas d'Exception à cet endroit-là [:sadnoir]


u = stupid [:seagal_sad]

Message cité 1 fois
Message édité par masklinn le 07-10-2009 à 15:52:52

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1929784
theredled
● REC
Posté le 07-10-2009 à 15:53:00  profilanswer
 

Le plus génial dans les trucs genre @caca(), c'est quand le machin te balance une vraie erreur à laquelle tu ne t'attendais pas... Ca passe complètement à la trappe, ou au mieux, vive la page blanche de l'espace.
 
Remarque, je sais plus si ça empêche le logging ou pas [:klemton]


---------------
Contes de fées en yaourt --- --- zed, souviens-toi de ma dernière lettre. --- Rate ta musique
n°1929785
FlorentG
Posté le 07-10-2009 à 15:53:00  profilanswer
 

masklinn a écrit :


Genre

Code :
  1. $whatever = explode($string)[3];


c'est pas illégal en PHP?


Citation :

Parse error: syntax error, unexpected '['


[:sadnoir]

n°1929786
skeye
Posté le 07-10-2009 à 15:53:08  profilanswer
 

masklinn a écrit :


Genre

Code :
  1. $whatever = explode($string)[3];


c'est pas illégal en PHP?


 
si.[:petrus75]
Une ligne d eplus a jamais tué personne.[:cosmoschtroumpf]


---------------
Can't buy what I want because it's free -
n°1929787
Dj YeLL
$question = $to_be || !$to_be;
Posté le 07-10-2009 à 15:53:20  profilanswer
 

masklinn a écrit :


Oui mais la syntaxe tablal, tu peux pas l'utiliser sur une fonction si?
 
Genre

Code :
  1. $whatever = explode($string)[3];


c'est pas illégal en PHP?


 
Si


---------------
Gamertag: CoteBlack YeLL
n°1929789
FlorentG
Posté le 07-10-2009 à 15:53:48  profilanswer
 


Non :o Faut pas vouloir mettre des Exceptions partout

n°1929790
skeye
Posté le 07-10-2009 à 15:53:52  profilanswer
 


:D [:joce] [:autobot]


Message édité par skeye le 07-10-2009 à 15:54:01

---------------
Can't buy what I want because it's free -
n°1929792
Dj YeLL
$question = $to_be || !$to_be;
Posté le 07-10-2009 à 15:54:27  profilanswer
 

theredled a écrit :

Le plus génial dans les trucs genre @caca(), c'est quand le machin te balance une vraie erreur à laquelle tu ne t'attendais pas... Ca passe complètement à la trappe, ou au mieux, vive la page blanche de l'espace.
 
Remarque, je sais plus si ça empêche le logging ou pas [:klemton]


 
En même temps y'a aucune raison d'utiliser @


---------------
Gamertag: CoteBlack YeLL
n°1929795
skeye
Posté le 07-10-2009 à 15:55:28  profilanswer
 

FlorentG a écrit :


Non :o Faut pas vouloir mettre des Exceptions partout


Seulement là où se présentent des cas exceptionnels pas gérés. Genre quand tu essayes de connaitre le type d'image que peut être un fichier texte, quoi.[:dawak]


---------------
Can't buy what I want because it's free -
n°1929797
masklinn
í dag viðrar vel til loftárása
Posté le 07-10-2009 à 15:55:50  profilanswer
 


[:jofission] [:jofusion]
 [:cerveau fission]  [:cerveau fusion]
?

FlorentG a écrit :


Citation :

Parse error: syntax error, unexpected '['


[:sadnoir]


skeye a écrit :

si.[:petrus75]
Une ligne d eplus a jamais tué personne.[:cosmoschtroumpf]


Bah ouais mais c'est une ligne qui sert à rien, et une justification (imo) acceptable pour écrire

Code :
  1. list(,,,$whatever) = explode($string)


:o

Message cité 1 fois
Message édité par masklinn le 07-10-2009 à 15:57:08

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1929798
masklinn
í dag viðrar vel til loftárása
Posté le 07-10-2009 à 15:56:44  profilanswer
 

Dj YeLL a écrit :


 
En même temps y'a aucune raison d'utiliser @


En smalltalk c'est pratiquen ça permet de créer un Point (ou un Point3D) [:glenda]


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1929800
skeye
Posté le 07-10-2009 à 15:56:55  profilanswer
 

masklinn a écrit :

une justification (imo) acceptable pour écrire

Code :
  1. list(,,$whatever) = explode($string)


:o


[:sadnoir]


---------------
Can't buy what I want because it's free -
n°1929801
masklinn
í dag viðrar vel til loftárása
Posté le 07-10-2009 à 15:58:06  profilanswer
 


Ça suffit de mixer le PascalCase et l'underscore_separated, on est pas en Ada [:masklinn:1]  


 [:beap]


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
mood
Publicité
Posté le   profilanswer
 

 Page :   1  2  3  4  5  ..  839  840  841  ..  1454  1455  1456  1457  1458  1459

Aller à :
Ajouter une réponse
 

Sujets relatifs
blabla 3blabla 2
PUTAIN HARKO TU AS FERM2 BLABLA ![Beaucoup de blabla pour rien : post à effacer] Compiler .bat
variable1="blabla + variable2 +blala : c'est possible ??[PHP & regex] "blabla blabla file.ext?point=444 blabla" Recupérer 444
mail("celine@hotmail.com"," sujet","blabla"); pose une err ! Help[MySQL] WHERE 'blabla' compris dans le champ truc
[blabla@olympe] Le topic du modo, dieu de la fibre et du monde[PHP / BlaBla - limite]
Plus de sujets relatifs à : blabla@web


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)