Which is faster between (string)$value and “$value” when casting to a string
问题 In PHP, assuming $value = 12345; (an integer), which is faster when casting $value from an integer to a string; $value = (string)$value; or $value = "$value"; This is a kind of performance measure question and specifically for this case. Thanks for your help! 回答1: Your question is really about the efficacy of the php interpreter, and how it converts php code (the one you write) to php bytecode (the one that runs and may actually consume time and resources). If i take p01ymath's experiment,